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

Token of other device is not expired after password changed #1561

Open
uysimatpassbase opened this issue Oct 26, 2022 · 0 comments
Open

Token of other device is not expired after password changed #1561

uysimatpassbase opened this issue Oct 26, 2022 · 0 comments

Comments

@uysimatpassbase
Copy link

  1. Set initializer config remove_tokens_after_password_reset to true

  2. If we look that the method. It explain we are removing all tokens except the latest token.

    def remove_tokens_after_password_reset
    return unless should_remove_tokens_after_password_reset?
    if tokens.present? && tokens.many?
    client, token_data = tokens.max_by { |cid, v| v[:expiry] || v['expiry'] }
    self.tokens = { client => token_data }
    end
    end

  3. If other device login later than our current client, his token is not expired and he still be able to access the application

  4. The behavior should be expire all the tokens except current client token.

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

1 participant