简体   繁体   中英

Migrating from google+ sign-in to new google sign-in

I'm trying to migrate my web application sign-in from Google+ API since its deprecated and gonna get shut down by March. I created new credentials(clientId,clientSecret) in Google API console. The OAuth scope is " https://www.googleapis.com/auth/userinfo.email " and I got the access token. Which API should I use to get the user_info with the access token? I'm getting confused by the documentation.

you can try use Firebase like identity provider. Look into this docs https://firebase.google.com/

There are a couple of good choices.

  • One of the userinfo endpoints. The most recent endpoint is available in the discovery document at https://accounts.google.com/.well-known/openid-configuration under the userinfo_endpoint key.

  • The People API 's people.get endpoint to get the "people/me" resource name. This gives you some flexibility about what fields you get. Depending on the fields you want, it might have a URL such as

    https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM