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

Refreshing is possible for deleted users #402

Open
cjhwang0222 opened this issue May 13, 2021 · 3 comments
Open

Refreshing is possible for deleted users #402

cjhwang0222 opened this issue May 13, 2021 · 3 comments
Labels

Comments

@cjhwang0222
Copy link

cjhwang0222 commented May 13, 2021

apologies for my broken English in advance.

while I'm developing a site, I happened to know that refreshing a pair of tokens is possible for deleted users once they keep refresh tokens.

steps what I've been through

  1. create an account and get issued a pair of tokens.
  2. keep the refresh token in a safe way (for me, I overrode some codes to issue the refresh token as a httponly cookies)
  3. delete db then regenerate a new empty db.
  4. the page where refreshing is processed returns a new pair of tokens.

When I reload the page, the refreshing process is NEVER denied, which could be abused especially when ROTATE_REFRESH_TOKEN=true

Though I'm using blacklist, since the refresh token is the latest refreshed one, it would never be rejected.

@Andrew-Chen-Wang
Copy link
Member

In general, I think this is why it's going to remain defaulted as False in the settings. I think what you mentioned is a good justification for keeping it that way :) Perhaps a link to this issue from the docs would be great if you'd like to create a PR!

@cjhwang0222
Copy link
Author

The biggest problem that I think is that such abusing can cause a sort of flood(?) in the blacklist db. So a solution(?) that I've thought out is to refresh the refresh token nearly due to the expiration. This process surely requires a decoding process which might take a bit more time.. but would it be matter? 😝

@Andrew-Chen-Wang
Copy link
Member

There is a setting that does that for every refresh, so it's possible. But it won't really be helpful if a client refreshes after expiration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants