-
Notifications
You must be signed in to change notification settings - Fork 17
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
Users are signed out before callback #5
Comments
Do you have multiple google accounts signed in? |
No. I'm signing in with Facebook. Then I attempt to connect with google apps, and Thanks for prompt reply! 👍 |
I figured it out. For some strange reason I had to add: class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
skip_before_filter :verify_authenticity_token
...
end |
Ah. The rails is detecting the CSRF attack and if the post request doesn't contain the token, will reset all the session data. |
Thank you for clarifying, I wasn't aware of that :) It still doesn't explain why it worked the other way around with Google Apps prior to Facebook authentication. May be that the |
You can check the log. Maybe it's GET request instead of POST request for omniauth-facebook. However, I'm not sure. Glad you figured it out. |
Thanks @sishen, I've submitted the pull request. |
In the case where I have already authenticated my user, and I'm trying to connect their Google Apps-account. The existing user seems to be signed out before my callback in
OmniauthCallbacksController
.I've verified this. It does not happen with the
omniauth-facebook
gem.I've tried to go through the code of the gem to identify where this happens, but no success so far.
Any ideas?
The text was updated successfully, but these errors were encountered: