google-app-engine - Google App Engine 仅注销应用程序,而不是整个谷歌帐户

标签 google-app-engine authentication go

我已经使用用户 api 创建了一个注销 url:https://developers.google.com/appengine/docs/go/users/overview

但我只希望它断开他们与我的应用程序的连接,而不是让他们退出其他 Google 服务(Gmail 等)。这可能吗?

最佳答案

您不能直接使用用户 API 执行此操作,但请参阅 this question对于替代选项:

Instead of using the UserService API to logout, you can manually remove the AppEngine specific cookies that are set. Check out this blog post that discusses how to so (written in Python, but you should be able to modify it for Java). This should effectively log the user out from your own app but not from other Google services (though I haven't tested this myself).

The more robust approach would be to create your own User class and manage your own session cookies, while wrapping the UserService API. The downside of this approach is the extra work that is required to set it up, compared to the very easy to use UserService API. However, the advantage of maintaining your own Users is that you will be able to use other methods of authentication besides for Google (e.g. now you will be able to use a Facebook login as well, or even a native login if you choose to set that up).

关于google-app-engine - Google App Engine 仅注销应用程序,而不是整个谷歌帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14322674/

相关文章:

python - GAE - 使用 urlfetch 将图像从 BlobStore 发布到外部服务器

django - 摘要、基本和承载身份验证

ruby-on-rails - 使用restful_authentication验证电子邮件帐户后rails自动登录

go - WebSocket - 关闭握手 gorilla

javascript - 使用 Beego/GoLang 在模板中插入 JavaScript 代码片段

python - 如何从 StackDriver Logging API 反序列化 App Engine 应用程序日志?

java - 有没有任何指南展示如何在 Eclipse 中使用 appengine 和 Maven 有效构建应用程序?

Python Gae 应用程序部署后不发送电子邮件

php - mysqli_real_escape_string 使用什么类型的引号?

php - 将嵌套循环内生成的数据存储在映射或 slice 中