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

undefined method `tokens' for #<Hash:0x000000063f0920> #297

Closed
adis-io opened this issue Jul 8, 2015 · 5 comments
Closed

undefined method `tokens' for #<Hash:0x000000063f0920> #297

adis-io opened this issue Jul 8, 2015 · 5 comments

Comments

@adis-io
Copy link
Contributor

adis-io commented Jul 8, 2015

This part is triggering this exception, because warden.user(rc.to_s.underscore.to_sym) returns hash, not User object. What should I do?
https://github.com/lynndylanhurley/devise_token_auth/blob/master/app/controllers/devise_token_auth/concerns/set_user_by_token.rb#L32

@adis-io
Copy link
Contributor Author

adis-io commented Jul 8, 2015

Just cloned devise_token_auth_demo. It returns user object. Strange.

@adis-io
Copy link
Contributor Author

adis-io commented Jul 9, 2015

It works only on 0.1.32.beta9 version, in later versions error is raised.

@booleanbetrayal
Copy link
Collaborator

@adisos - are you still experiencing this issue? I'm currently unable to reproduce. Please try testing against the latest devise_token_auth 0.0.32 (and ng-token-auth 0.0.27 if you're using it)

@ysyyork
Copy link

ysyyork commented Oct 28, 2015

I have the same problem with version 0.1.36. It only works for the first time when I start the server and use token to authenticate. From the second time on, it will raise this exception. But it can work will with version 0.1.32.beta9

@chirag7jain
Copy link

even I am facing the exact same issue

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

4 participants