Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't delete all oauth clients on startup
When an oauth client changes, we delete all the tokens associated with that client. This invalidates all user sessions for that oauth client, and the oauth client's users will need to go through the OAuth workflow again after the cache period (specified by cache_max_age in HubAuth, 5min by default). This is fine in theory, since oauth client information doesn't change frequently. However, we were deleting and re-adding all oauth clients each time the hub started! This was unnecessary, since the data was going to be the same 99% of the time. Rest of the time, we should just update, preventing unnecessary churn. This PR does that. Ref yuvipanda/jupyterhub-configurator#2 Ref berkeley-dsep-infra/datahub#2284
- Loading branch information