" https://www.google.com/accounts/Logout"清除浏览器中的所有Google Cookie [英] "https://www.google.com/accounts/Logout" clears all the google cookies in browser

查看:657
本文介绍了" https://www.google.com/accounts/Logout"清除浏览器中的所有Google Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将Google用作OpenID。

用户可以使用自己的Google电子邮件成功登录我的网站。

问题: t从其成功注销。

I am trying to use Google as OpenID.
Users can successfully login to my site using their Google email.
Problem: They can't sign out successfully from it.

当用户在我的网站中点击退出按钮时,我只能清除网站本身发布的Cookie,而不能清除Google发布的Cookie。

我有googled以及在stackoverflow中阅读许多文章。我发现的解决方案是,我不能自己删除Google Cookie。为了删除该Cookie,我必须将我的信息页重定向到 https://www.google.com/accounts/退出,用于清除Google在我的浏览器中发布的Cookie。

When user clicks sign out button in my website, i can only clear the cookies issued by my site itself but not the cookies issued under Google.
I have googled as well as read many article in stackoverflow. The solution i found is that i can't delete Google cookies myself. In order to delete that cookie i have to redirect my Page to https://www.google.com/accounts/Logout which cleans the Cookies issued by Google in my browser.

另一个问题开始:该网址会清除浏览器中的所有Google Cookie。如果用户使用Google作为OpenID登录其他网站,甚至在同一浏览器的Gmail中,他们的Cookie也会在登出我的网站时被删除。

是否有解决方案?

Another Problem begins: That url clears all the google cookies in the browser.If the user is login in other sites using Google as OpenID or even gmail at the same time in the same browser, their cookies also get deleted while logging out of my site.
Is there solution to it?

演示在您自己的浏览器中尝试以下步骤:

1-使用您自己的身份验证登录Gmail

2.然后点击 https://www.google.com/accounts/Logout

会发生什么是您的Gmail帐户将自动注销。

For Demo Try following steps in your own brower:
1- Login Gmail with your own authentication
2. then Click on https://www.google.com/accounts/Logout.
What will happen is your gmail account will be logout automatically.

推荐答案

据我从您的文章中了解到,您希望将用户从Google登录。您可以使用 https://www.google.com/accounts/Logout 无问题。

As far as what I understand from your post, you want to log your users out of Google. For which you can use https://www.google.com/accounts/Logout without a problem.

您可以使用以下函数为您执行此操作:

You can use the following function to do it for you:

var logout = function()
{
    document.location.href = "https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=http://stackoverflow.com";
}

您应该替换 http:// stackoverflow。

where you should replace http://stackoverflow.com with your home page.

这将有助于您完成工作。

This should help you get your job done.

这篇关于" https://www.google.com/accounts/Logout"清除浏览器中的所有Google Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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