-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: update token on login (rebase) #4447
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
base: master
Are you sure you want to change the base?
Conversation
76cb1b8
to
350d3f1
Compare
@aeneasr tests that have been passing on main are passing and I've given it my best shot to implement your suggestions given in #2428 (comment) A couple of them the original contributor already got to, I've taken it upon myself to introduce a per-provider feature flag. There's an E2E test that checks if this functionality is working but no unit test. In the case we need one, I'd greatly appreciate some input what tests exactly should be added. I have broken the token update logic into its own function to facilitate unit tests more easily though. |
This PR rebases #2428 onto the current master as the original maintainer has gone missing.
The aim is the same as in the original PR. Ory should save tokens its getting on each login. This is helpful in scenarios where the user is encountering a consent screen and the refresh token issues to the backend was invalidated, i.e. through a scope change.
Further, this simplifies implementing applications that might not need to do any background processing and require a login to use. For those usecases the most recent token issued on login is sufficient.
Related issue(s)
#1912
#2428
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
[email protected]) from the maintainers to push
the changes.
works.
Further Comments