How to Sign out user using Google+ API?

拜拜、爱过 提交于 2019-12-04 21:33:52

Google+ API doesnt provide any methods to log a user out of the Google's single sign-on, because it shouldnt be handled at the layer of Google+ API.

Google+ authorize and authenticate you with an access token that is gathered by your auth flow that needs a signed-in Google account. If you want to log the user out of Google network, you should redirect him/her to

https://accounts.google.com/Logout?&continue=[nextUrl]

or clear all of the cookies on launch or shutdown.

If you want to revoke the access token you retrieved for your application, you should use https://developers.google.com/accounts/docs/OAuth2WebServer#tokenrevoke that will expire the existing access token.

Google+ do not provide any api for signout or rather they didnt worked for me.

i found out other solution which i am mentioning here try this out. it worked out for me.

https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue='your site url'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!