OAuth 2.0 is an open standard that allows a third-party application to access private resources (e.g., photos, videos, contacts) stored on a website on behalf of a user, without requiring the user to share their credentials (username and password) with the third party.
There are four primary roles in the OAuth 2.0 flow:
- Resource Owner: The end-user who grants access to the protected resources.
- Resource Server: The server hosting the protected resources. It validates the
access token provided by the client before returning the requested data. - Authorization Server: The server that authenticates the resource owner and issues the
Access Token to the client upon successful authorization. - Client: The third-party application (or an official app) that requests access to the resource owner's data using the access token.