-
Notifications
You must be signed in to change notification settings - Fork 449
Retain refresh token expiry on refreshing #360
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
Retain refresh token expiry on refreshing #360
Conversation
Appreciate the fix as it does seem like there's a bug there. There's a few issues per comments. Suggest approach this a little differently:
That's a bit more work, but eventually should allow the expiration checks to be simplified later on after users have a chance to migrate. The alternative would be to update |
Updated PR based on comments. |
Did another pass and addressed the changes as well as added tests. |
* fix refresh token expiry lost during refresh * add failing test * revert previous changes to go with a different approach * stab at expires at variables * fix test and typo * fix typo * clean up code for easier review, minimize changes, follow previus patterns * add missing var * fix canRefresh logic * add setExpiresAt tests * remove extra comment * add tests and fix typo in logic Co-authored-by: Steve Bazyl <sbazyl@google.com>
* fix refresh token expiry lost during refresh * add failing test * revert previous changes to go with a different approach * stab at expires at variables * fix test and typo * fix typo * clean up code for easier review, minimize changes, follow previus patterns * add missing var * fix canRefresh logic * add setExpiresAt tests * remove extra comment * add tests and fix typo in logic Co-authored-by: Steve Bazyl <sbazyl@google.com>
* fix refresh token expiry lost during refresh * add failing test * revert previous changes to go with a different approach * stab at expires at variables * fix test and typo * fix typo * clean up code for easier review, minimize changes, follow previus patterns * add missing var * fix canRefresh logic * add setExpiresAt tests * remove extra comment * add tests and fix typo in logic Co-authored-by: Steve Bazyl <sbazyl@google.com>
* fix refresh token expiry lost during refresh * add failing test * revert previous changes to go with a different approach * stab at expires at variables * fix test and typo * fix typo * clean up code for easier review, minimize changes, follow previus patterns * add missing var * fix canRefresh logic * add setExpiresAt tests * remove extra comment * add tests and fix typo in logic Co-authored-by: Steve Bazyl <sbazyl@google.com>
* fix refresh token expiry lost during refresh * add failing test * revert previous changes to go with a different approach * stab at expires at variables * fix test and typo * fix typo * clean up code for easier review, minimize changes, follow previus patterns * add missing var * fix canRefresh logic * add setExpiresAt tests * remove extra comment * add tests and fix typo in logic Co-authored-by: Steve Bazyl <sbazyl@google.com>
Right now, on refreshing tokens, the refresh token becomes treated as never expiring since the refresh_expires* properties are not persisted on refresh.
refresh_expires_in
(See Add support for refresh_expires_in #358)