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

tokens not being serialized! #495

Closed
killerham opened this issue Jan 14, 2016 · 5 comments
Closed

tokens not being serialized! #495

killerham opened this issue Jan 14, 2016 · 5 comments

Comments

@killerham
Copy link

Pull request #276 conditional serialize doesn't serialize for sqlite. This bug re-introduces issue #121

I'm not sure if its the ruby version I'm running (tested on 2.1.1 and 2.2), but I'm running rails 4.2. I'm on the latest commit of devise_token_auth.

To fix the issue simply put serialize :tokens, JSON above include DeviseTokenAuth::Concerns::User in the user model to override the conditional serialize OR remove the condition check from the concern.

@mada41
Copy link

mada41 commented Jan 19, 2016

hi @killerham , i have same problem and follow your instruction, but i get "
no implicit conversion of Hash into String" error.

@killerham
Copy link
Author

It sounds like you have the opposite problem. In your schema, are tokens a json type or string type?

@alfredoreduarte
Copy link

Just had this issue and @killerham 's tip fixed it. This should be somehow included in the gem though 🤔

@zachfeldman
Copy link
Contributor

Seems like we have an accepted solution here, so closing this for now.

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

5 participants