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

Devise + Ember-Simple-Auth broken Sign in system #27

Closed
Deovandski opened this issue Mar 30, 2016 · 3 comments
Closed

Devise + Ember-Simple-Auth broken Sign in system #27

Deovandski opened this issue Mar 30, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@Deovandski
Copy link
Owner

Noticed on Checkpoint 8 committed on 3/30/16. Devise sign in always responds with the same user upon signin even if there are other credentials...

Root cause unknown. Ideas to investigate:

  • Cookie based CSRFprotection somehow interfering with Devise? Pull a Experimental v0.5 commit and thoroughly test to see if the nonimplementation of CSRF allows it to work.
  • Devise dropped support for token on 3.x... Further check how this will be dealt with or if the recent up in version was the reason behind the failure.
  • Devise not handling Destroy session properly? If so, drop the use of custom session? Guarantees that it will not be as finicky?
@Deovandski Deovandski self-assigned this Mar 30, 2016
@Deovandski Deovandski added the bug label Mar 30, 2016
@Deovandski Deovandski added this to the Alpha milestone Mar 30, 2016
@Deovandski Deovandski mentioned this issue Mar 30, 2016
55 tasks
@Deovandski Deovandski reopened this Mar 31, 2016
@Deovandski
Copy link
Owner Author

Close, but no cigar this time. The proper user is being logged in if the parameters matches, but if the params don't, then the previous logged in user is being returned (due to the cookie session not being fully destroyed)... Getting closer I guess.

@Deovandski
Copy link
Owner Author

Everything is working now except when it comes to dealing with invalid authenticity token issue when following this exact flow:

  1. On a new page (or after a page reload), user signs in.
  2. User signs out
  3. User sign in again
  4. User signs out

The fourth step causes the server to respond with 422 due to Invalid authenticity token. However, if you reload the page, the user will be able to sign out.

  • Currently thinking that Devise updated the token on step 3, and it is either not replying it back with it or Ember-cli-auth is out of the loop when it comes to the csrf session token.

Perhaps removing Devise new csrf token would help, but this will allow session fixation attacks.

@Deovandski
Copy link
Owner Author

Problem closed. CSRF authenticity token is skipped fro destroying session without removing devise token change upon login

Deovandski added a commit that referenced this issue Apr 1, 2016
Deovandski added a commit that referenced this issue Apr 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant