Hello,
Im using Laravel Sanctum, Fortify and Vue in a stateful application right now and Im trying to figure out how hard a separation would be after the basic features were already implemented with Fortify and Sanctum as a stateful application.
The docs provide this information:
If you are attempting to manually build the authentication layer for an application that offers an API or serves as the backend for a single-page application, it is entirely possible that you will utilize both Laravel Fortify (for user registration, password reset, etc.) and Laravel Sanctum (API token management, session authentication).
What does this mean? If its "entirely possible that you will utilize both Laravel Fortify (for user registration, password reset, etc.) and Laravel Sanctum" why would I need to manually build the authentication layer?
So what would I need do if I still wanted to use fortify (in a stateless API)?
why would I need to manually build the authentication layer?
@swissbrain You wouldn’t, given Laravel offers about half a dozen different packages for different authentication scenarios.
Fortify provides functionality for stateful authentication but as the potion of the docs you’ve highlighted says, you’d need to use something else (Sanctum or Passport) to add token-based authentication for your stateless API.
If you are attempting to manually build the authentication layer for an application that offers an API or ... it is entirely possible that you will utilize both Laravel Fortify ... and Laravel Sanctum
Thats why Im asking, if it would state that its impossible I wouldnt be here asking. The Laravel docs can be a bit vague sometimes...