UserService检索注销后错误的用户 [英] UserService retrieves wrong user after logout

查看:173
本文介绍了UserService检索注销后错误的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从UserService得到的currentUser

I get CurrentUser from UserService

 UserServiceFactory.getUserService().getCurrentUser().getEmail()

它的工作原理时。但是,当我退出,UserService还是回到相同的电子邮件。

It works when. But when I logout, UserService still return same email.

推荐答案

假设你通过为GAE的惯用手段登录,您的浏览器将最终有两个会话cookie - 一个是谷歌和一个用于应用程序

Assuming you're logging in by the usual means for GAE, your browser will end up with two session cookies - one for Google and one for the app.

如果您还使用通常的办法注销(从注销URL create_logout_url ),那么这两个Cookie被删除。

If you also log out by the usual means (the logout URL from create_logout_url), then both cookies are deleted.

但是,如果用户浏览从您的应用程序到其他一些谷歌的服务,并从那里注销谷歌的离开,那么你的应用程序,cookie不会删除(至少不适合我在Firefox)。我不知道,它甚至可以是 - 一旦浏览器为您的应用程序了,很可能就不会允许谷歌网站去触摸你的应用程序的cookie以任何方式

However, if the user browses away from your app to some other Google service and logs out of Google from there, then the cookie for your app isn't deleted (at least, not for me in Firefox). I'm not sure that it even can be - once the browser is away from your app, quite possibly it won't allow Google sites to touch your app's cookies in any way.

该修补程序的的以提供您的应用程序注销链接,为用户注销使用。如果你已经这样做,那么我不知道是什么问题...

The fix should be to provide a logout link in your app, and for the user to log out using that. If you're already doing that, then I don't know what the problem is...

这篇关于UserService检索注销后错误的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆