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

Fix user tokens that don't properly deserialize #983

Closed

Conversation

MaicolBen
Copy link
Collaborator

Resolves #121

@zachfeldman
Copy link
Contributor

@MaicolBen I don't exactly understand the error and why this fixes it - if you can explain I'm glad to review and possibly merge!

@MaicolBen
Copy link
Collaborator Author

@zachfeldman I don't know the cause of the error. The token is stored corrupted randomly, so once it tries to read tokens in the login, it breaks with string not matched. As an example of a wrong stored token:

"{\"70crCAAYmNP1xLkKKM09zA\":{\"token\":\"$2a$10$mSePnpVMaaegCpn3AhORGe5wajFhgMoBjGIrMwq4Qq2mP6f/OHu1y\",\"expiry\":12121234}}"

I know this isn't the best solution not knowing the cause, and since it's almost impossible to reproduce it, this is the solution that solved the problem. You can close this PR but I think the issue should remain open.

@zachfeldman
Copy link
Contributor

Hmm ok I'll defer to @lynndylanhurley or another contributor on this one then.

@lynndylanhurley
Copy link
Owner

I'll take a look ASAP. I'm not sure if it's possible to write tests around this, but I'll try to trigger the issue and maybe see what's causing it.

@MaicolBen
Copy link
Collaborator Author

Closing this since now I realized that this migration won't make sense without users (it just created the table).

@MaicolBen MaicolBen closed this Oct 31, 2017
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

Successfully merging this pull request may close these issues.

3 participants