
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.
