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

broken oauth: don't use symbols as session keys because rails stringifies all session keys #113

Closed
igorbernstein opened this issue Nov 30, 2010 · 3 comments

Comments

@igorbernstein
Copy link

oauth is broken on rails 3 because it stores its state in session[:oauth] which rails promptly converts to session['oauth']
the strategy fails to find its state during the callback_phase because session[:oauth] doesn't exist

@mbleigh
Copy link
Contributor

mbleigh commented Nov 30, 2010

Closed by 9243f80 - Use string session keys in oauth.rb

@igorbernstein
Copy link
Author

I think stringify keys is recursive so
(session[:oauth]||={})[name.to_sym]
will fail because of the name symbol

@mbleigh
Copy link
Contributor

mbleigh commented Nov 30, 2010

OK, everything is stringed now, but as a warning I don't think this is a problem with Rails but must be with something else you're using. I've used OmniAuth with Rails 3 time and again without issue.

dcu pushed a commit to dcu/omniauth that referenced this issue Jul 5, 2011
dcu pushed a commit to dcu/omniauth that referenced this issue Jul 5, 2011
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants