

You do not need to manually define this route. Remember, the /oauth/authorize route is already defined by Passport. If no prompt value is provided, the user will be prompted for authorization only if they have not previously authorized access to the consuming application for the requested scopes. When the value is login, the Passport application will always prompt the user to re-login to the application, even if they already have an existing session. If the value is consent, Passport will always display the authorization approval screen, even if all scopes were previously granted to the consuming application. If the prompt value is none, Passport will always throw an authentication error if the user is not already authenticated with the Passport application. The prompt parameter may be used to specify the authentication behavior of the Passport application.
#LARAVEL SOCIALITE OAUTH2 INSTALL#
To get started, install Passport via the Composer package manager: Laravel Sanctum does not support OAuth2 however, it provides a much simpler API authentication development experience. However, if you are attempting to authenticate a single-page application, mobile application, or issue API tokens, you should use Laravel Sanctum. If your application absolutely needs to support OAuth2, then you should use Laravel Passport. If you do not know anything about OAuth2, consider familiarizing yourself with the general terminology and features of OAuth2 before continuing.īefore getting started, you may wish to determine if your application would be better served by Laravel Passport or Laravel Sanctum. This documentation assumes you are already familiar with OAuth2. Passport is built on top of the League OAuth2 server that is maintained by Andy Millington and Simon Hamp. Laravel Passport provides a full OAuth2 server implementation for your Laravel application in a matter of minutes.
