删除rails应用程序中instagram授权页面的cookie
在我的 Rails 应用程序中,我使用 oauth 来访问用户的配置文件数据。问题是,当 Instagram 的授权登录页面弹出时,用户必须输入他的登录详细信息,一个 cookie 会保存在我的机器中。有没有办法删除这个cookie(显然不是手动)?我问这个是因为当再次调用 oauth 页面时,保存在我的浏览器中的这个 cookie 会自动登录用户。这对我的项目来说已经成为一个麻烦。我不希望发生这种情况,我希望再次显示相同的登录页面。
In my rails application i am using oauth to get access to the user's profile data. The thing is when the instagram's authorization log-in page pops up, the user has to enter his log-in details, a cookie gets saved in my machine. Is there any way to DELETE this cookie(obviously not manually)? I am asking this because when the oauth page is called again, this cookie saved in my browser automatically signs in the user. This has become a nuisance for my project. I don't want this to happen, i want the same log-in page to be displayed again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您想要将用户从 Instagram 以及您的应用程序中注销。为此,您可以将他们的浏览器发送至 https://instagram.com/accounts/logout/。我见过它用作图像 URL 或加载到零大小的 iframe 中。我怀疑第二个是更好的选择。
这样,第二次将需要再次登录 Instagram,但不会要求他们重新授权您的应用程序。
I'm assuming that you are wanting to log the user out of instagram as well as your application. In order to do that you can send their browser to https://instagram.com/accounts/logout/. I've seen it used as a image URL or loaded in a zero size iframe. I suspect the second is the better option.
That way it will required the instagram login again the second time, but won't require them to reauthorize your application.