OAuth is an open standard used by APIs to control access to the resources by clients, such as websites, desktop applications, or even other APIs. However, the API implementing OAuth can provide user information without sharing the password with third-party apps.
You must have seen websites where they allow logins using different services, such as Facebook, Twitter, or Google, saying something such as (for Facebook) Login with Facebook. That means Facebook has an OAuth server that would validate your app by a certain identity that you have provided to Facebook earlier, and give you an access token that would have some validity. Using that token, you can read the required user's profile.
The following is some basic OAuth2.0 terminology:
- Resource: We have already defined this in previous chapters. Resources are the things that...