lynndylanhurley / lynndylanhurley/devise_token_auth
Update password does not invalidate current token
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 3.6k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I have config.check_current_password_before_update = :password enabled. I am successfully changin the password by using the PUT method on /auth. I have noticed that once the password has changed the token is not invalidated and keeps working, which means that the logged in user can still use the site, even if that token was generated when the user signed in with the old password. How can I invalidate the token once the password is updated?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the password change through PUT /auth with config.check_current_password_before_update = :password enabled, then verify whether the existing token still accesses the site. Trace the password update and token handling around that endpoint; done means a token issued before the password change is rejected afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100