Understand OAuth 2.0 in 2 minutes. After reading this article, you will understand how OAuth works and know if you need it in your next project. Fingerprint representing OAuth 2.0 - May 20 · 3 min read. How OAuth works? In this example, the passport is your authentication, and the access key your authorization (which room or rooms of the hotel you can access).
After reading this article, you will understand how OAuth works and know if you need it in your next project.
Before we go further, you need to understand the difference between Authentication and Authorization.
In the case of a hotel, you need to go to the front desk to get your access card for your room. In order to do that, you will need to present your passport.
In this example, the passport is your authentication, and the access key your authorization (which room or rooms of the hotel you can access).
Hotel example for OAuth 2.0
Your personal information never leaves the front desk, this is OAuth where the front desk plays the role of the authorization server. In that case, the access key represents the access token that will make you access your room (the resource).
OAuth is an authorization framework as we saw in the example above.
OAuth allows services to access each other on behalf of the user. For example, if you do log in with OAuth, you might give access to a service to read your google drive account or access to your google email account and your profile picture.
In short, you need OAuth when you want to access some information from an external service like Facebook, Google, Twitter, LinkedIn,….
What is 2FA Two-Factor Authentication (or 2FA as it often referred to) is an extra layer of security that is used to provide users an additional level of protection when securing access to an account.
What is PHP: - Who invented PHP, how it works, answers to all such questions about PHP, and much other information, you are going to