Remove password hashing for each token login#753
Remove password hashing for each token login#753LOUISLCE wants to merge 2 commits intopallets-eco:developfrom
Conversation
| data = _security.remember_token_serializer.loads( | ||
| token, max_age=_security.token_max_age) | ||
| user = _security.datastore.find_user(id=data[0]) | ||
| if user and verify_hash(data[1], user.password): |
There was a problem hiding this comment.
I think the reason to call verify_hash was to make sure that the token is invalidated once a user changes her password. Can you propose any solution that allows users to invalidate the remember token?
|
just thinking out loud here, i wonder if it could work to store verified tokens in the database, and whenever the user changes their password, clear out the cache. so whenever |
|
Please see some ideas in: #771 |
Hi,
The token request loader was critically slowing down login process according to #731 and #740 .
This remove hashing the user password at every request, which is pretty useless given that
the token is already signed by the serializer (and as such is hard to fake).
Thanks!