Reputation: 504
I am using ASP.NET forms (not MVC) along with their out of the box templated solution for logging using Facebook, Twitter, etc (all wrapped up in Microsoft.AspNet.Membership.OpenAuth).
Everything seems to be working fine except for one thing: Every time a user logs in with Twitter, they are being redirected to Twitter and asked to Authorize the application. Regardless of whether they have done it already (i.e. The user logins for first time, authorizes against the Twitter app, get redirected back to our site perfectly. Then they log out, and go to log in again, and they are re-prompted to authorize. The application shows up in the list of approved apps under the user's Twitter account.
I have ready some places where people are having similar problems, but not using the Microsoft libraries. They seem to point to using a different URL when launching to Twitter, however, I don't seem to be able to find that level of granularity with the MS libraries.
Has anyone been able to reproduce/solve this issue using these libraries? I am not intimately familiar with how this all works, but I notice that DotNetOpenAuth is also a part of my references. If this is the library that is feeding the Membership.OpenAuth classes, perhaps there is an update that I need? My DotNetOpenAuth.OAuth version shows 4.1.0.0 and runtime version if v.4.0.30319.
Thanks, J
Upvotes: 0
Views: 136
Reputation: 1739
I had the same problem. I'm using the following to connect to twitter:
OAuthWebSecurity.RegisterTwitterClient(key, secret)
and using the latest OpenAuth 4.3.0.0
Login works ok, but it keeps asking to Authorize App each time.
Turned out that in my Twitter App settings I did not have the following ticked
Allow this application to be used to Sign in with Twitter
When I ticked this, the normal OAuthWebSecurity.RegisterTwitterClient() worked fine
Upvotes: 1