Twitter登录页面始终显示 [英] Twitter Sign in page always showing

查看:247
本文介绍了Twitter登录页面始终显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用asp.net mvc 3使用DotNetOpenAuth lib在我的网站上实现了使用Twitter登录。

I have implemented Sign in with Twitter on my web site using DotNetOpenAuth lib using asp.net mvc 3.

我的问题是,每次用户单击Sign-在Twitter中,它会将他重定向到Twitter页面(即使他已经登录到Twitter)。

My problem is that every time the user click Sign-in with twitter it redirects him to a twitter page (even if he is already logged in to twitter).

我看到类似www.pinterest.com的网站避免了这种情况

I saw that sites like www.pinterest.com avoids this somehow.

如果用户已经登录到Twitter,如何避免重定向到Twitter登录页面?

How can I avoid the redirect to Twitter sign-in page if the user is already logged in to twitter?

推荐答案

这称为使用Twitter 。将用户重定向到 https://api.twitter.com/oauth/authenticate?oauth_token=xyz 而不是 https://api.twitter.com / oauth / authorize?oauth_token = xyz 。如果用户与twitter.com处于活动会话并且先前已授权该应用程序,则他们将被静默重定向到回调URL。

This is called Sign in with Twitter. Redirect users to https://api.twitter.com/oauth/authenticate?oauth_token=xyz instead of https://api.twitter.com/oauth/authorize?oauth_token=xyz. If the user is has an active session with twitter.com and has previously authorized the application they will silently be redirected to the callback url.

这篇关于Twitter登录页面始终显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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