

This token provides immediate access to a resource, without requiring a username and password.Īll necessary information is linked to this token, including user details and the scope of possible actions this third party may perform on behalf of this user. The bearer being the third party application, which possesses an access token issued by the identity provider. The word "Bearer" means you're in possession of a certain (access) token. Let's have a look at what is meant with the terms "Bearer token" and "authorization flow". This improved protocol offers support for Bearer tokens and provides "specific authorization flows for web applications, desktop applications, mobile phones, and smart devices." (via Wikipedia) I explicitly mention Twitter since development of this standard was (amongst others) driven by lead developer Blane Cook, in need of authorization of external parties.Īfter initial release of version 1.0 in 2010, the protocol matured over the course of 2 years after which version 2.0 was released. Think of using a third party Twitter app which can tweet on your behalf to the Twitter platform. OAuth is an open standard, designed to provide API access delegation.

If you're not yet familiar with the OAuth2 protocol, I've included a section on the how and what below.īefore jumping into Laravel Passport, it is important to understand the OAuth protocol it implements. Note: the applications do not necessarily have to use the same domain. In this way, users will be able to login to the child applications without creating a new, separate account.
Laravel socialite oauth2 how to#
In this post I try to explain how to achieve this infrastructure, by creating a central application using Laravel Passport () where users register once and then use OAuth2 to grant access to their account to the other applications (,, etc.) using Laravel Socialite. A question popping up every now and then is how to let users log in to separate (child) applications using a single account they own on a central application.
