Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete social login for Twitter results in 404 #1707

Closed
stevejgordon opened this issue Jan 14, 2017 · 5 comments · Fixed by #1735
Closed

Incomplete social login for Twitter results in 404 #1707

stevejgordon opened this issue Jan 14, 2017 · 5 comments · Fixed by #1735

Comments

@stevejgordon
Copy link
Member

stevejgordon commented Jan 14, 2017

If you don't fully complete the social login registration (test with Twitter but may affect other services) it's possible to get into a position where you cannot use that provider any longer.

Steps to reproduce:

  • Ensure you have user-secrets setup for Twitter with a valid key and secret
  • On the login page choose to login with Twitter
  • On redirect you will be taken to a page to complete your name and email etc.
  • Navigate away from this page, without completing the process
  • Go back to the login screen and choose Twitter again.
  • You will get a 404 error from the site

The local solution is to delete the cookies for the site which removes the Identity.External cookie and allows you to retry the process.

The flow of the site may need review to see if we can prevent this situation.

@BillWagner BillWagner added this to the December v1.0 Release Milestone milestone Jan 16, 2017
@BillWagner
Copy link
Member

Adding ready issues to the Dec V1 milestone.

@shahiddev
Copy link
Contributor

@BillWagner I'll take a look at this

@shahiddev
Copy link
Contributor

shahiddev commented Jan 16, 2017

FYI for anyone trying to setup twitter auth for testing, you need to provide a url for callback in the twitter even though its not a mandatory field. Without this you'll run into a 401 error before you even see the consent screen

@shahiddev
Copy link
Contributor

@stevejgordon I can't seem to reproduce this exactly as you've described. If I cancel or navigate away from the twitter consent screen and then return to AllReady login screen and try Twitter again it works as expected.

However if/when I press the cancel button it gives me an option to return back to AllReady page, that currently fails.
image

I have a potential solution for this

@shahiddev
Copy link
Contributor

There a couple of fixes involved here, the original issue actually occurred after user has given consent in social medial login screen and is returned back to the externallogin callback to complete registration. Cancelling here does indeed cause an issue, it appears to be linked to the issue described here aspnet/Identity#915 (comment)
The fix described in there involved updating the account controller to clear external login cookies when trying to login.

MisterJames pushed a commit that referenced this issue Jan 19, 2017
* Failed twitter authentication (e.g. user cancelling consent) no longer crashes

* Partial login with social provider where user navigates away before completing additional information form no longer leaves the login process in an invalid state

* All social logins now handle remote failure by redirecting users back to login page

* Fixes unit test issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants