gpt4 book ai didi

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

转载 作者:IT王子 更新时间:2023-10-29 01:25:39 27 4
gpt4 key购买 nike

我已经使用用户 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com