Allow Fortify to work with custom authentication routes
sts-ryan-holton opened this issue · comments
I'm using Laravel 8 as an API backend to a Nuxt JS front-end. I already have logic, account creation and user endpoints set up that do specific things, such as my login endpoint does some checks against a user role column.
I'm using the Fortify Two Factor Authentication feature, but without using the built in Fortify /login
route it doesn't seem to ask me to input a verification code, when I change my backed and point my front-end to Fortify's /login
route then it works.
I suspect a similar scenario is true for account registration, I currently use my own email verification login but I'd probably need to switch my frontend to use the Fortify's /register
route for this to work.
Can we customise the routes?
You can use Fortify::ignoreRoutes()
in your service provider and use your own routes if you like. You'll still have to use the same route names in order for everything to continue to work.
You can use
Fortify::ignoreRoutes()
in your service provider and use your own routes if you like. You'll still have to use the same route names in order for everything to continue to work.
That's useful to know. How can I extend the logic of the Fortify login stuff then to be able to facilitate my my additional requirements?