Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

OAuth 2.0 overview


May 23, 2021 OAuth 2.0 Series


Table of contents


Review

As mentioned in the introduction, OAuth 2.0 is an open authorization protocol that enables applications to access each other's data, and here we will explain how the protocol works and the concepts mentioned in the specification. The diagram illustrates the entire authorization process:

OAuth 2.0 overview

An example of how OAuth 2.0 can be used to share data between apps

The first step is for the user to access the client web app. The button in the app "sign in via Facebook" (or other systems, such as Google or Twitter).

The second step, when a user clicks a button, they are redirected to an authorized app, such as Facebook. The user logs on and confirms that the data in the authorized app is applied to the client.

In the third step, the authorization app redirects the user to the URI provided by the client app, which is typically done by registering the client application with the authorization application. I n registration, the owner group of the client app registers the redirect URI, and the authentication app also applies the client identity and password to the client during the registration process. A dd a certification code after the URI. This certification code represents authorization.

In the fourth step, the user's access page in the client app is positioned to redirect the URI. T he connection authorization app is applied to the client behind it, and the client identity, client password, and authentication code received in the redirect request parameters are sent. The authorization app returns an access password.

Once the client has an access password, it can be sent to Facebook, Google, Twitter, and more to access the logged-in user's resources.