2013-02-27 126 views
1

我试图将django sanction整合到我的博客应用程序(此处为django newbie),但我似乎无法在登录过程后“注销”用户(使用Google OAuth2.0 )。django sanction oauth2.0注销用户

整个过程似乎没有痛苦 - 即我能够获取我的数据库的所有用户详细信息,并能够访问我的django模板上的用户详细信息,但是,当我注销并尝试重新登录时,似乎记得我的凭据(饼干?)。我试图从here

PS注销: - (?)我正在开发本地主机上想如果这是问题

+0

是什么查看你的/ o /注销/提供服务? – GordonsBeard 2013-02-27 22:20:31

+0

这将是有用的,看到你的看法。 – 2013-02-27 22:21:56

+0

@GordonsBeard:/ o /注销/返回到localhost:8000但是当我尝试再次登录时,它显示相同的Google个人资料信息 - 这表明它没有注销我。 – JohnJ 2013-02-27 22:24:36

回答

0

在这里看到:How to force user logout in django?

报价:

I don't think there is a sanctioned way to do this in Django yet. 

The user id is stored in the session object, but it is encoded. Unfortunately, that means you'll have to iterate through all sessions, decode and compare... 
+0

我觉得很难相信:( – JohnJ 2013-02-27 22:26:23