lynndylanhurley / lynndylanhurley/devise_token_auth

Update password does not invalidate current token

Open
#1,339 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.