Is there any relationship between access_token and login users in oauth2?

about oauth2, on the Internet, it is said that oauth2 is an authorized protocol and does not have the function of authentication. It means that even after you finally get the access_token, there is no way to get the information of the current login through access_token, right? If so, the example in has a "cloud printing" website that can store users" photos in Google and print them out. In order to use the service, users must let "cloud printing" read the photos they have stored on Google. , you can"t do it with oauth2 alone, right? Because only access_token has no idea who I is.

Mar.15,2021

oauth is to give you a token through which you can get all kinds of information from the authorized party. As for what kind of information, it depends on what the authorized party provides. access_token can do anything within the authorized scope of the authorized party within a certain period of time. For example, Wechat provides an API for obtaining user information. Then you can use access_token to go to Wechat's designated interface to get the basic information of the login user, including openid , this openid is the unique identity of the currently logged-in user in the authorized party (Wechat). You can save him to your own server, and the next time this user is authorized to log in to your server, you will know who this user is.

Menu