How to identify a Google OAuth2 user?

后端 未结 6 954
误落风尘
误落风尘 2020-11-27 10:48

I used Facebook login to identify users. When a new user comes, I store their userID in my database. Next time they come, I recognized their Facebook ID and I know which use

6条回答
  •  春和景丽
    2020-11-27 11:25

    Altough JWTs can be validated locally with the public key, (Google APIs Client Library downloads and caches they public keys automatically) checking the token on Google's side via the https://www.googleapis.com/oauth2/v1/tokeninfo endpoint is necessary to check if the access for the applicaton has been revoked since the creation of the token.

提交回复
热议问题