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

Always regenerate a new token on valid client credentials #2

Merged
merged 3 commits into from
Feb 19, 2024

Conversation

tarzan
Copy link
Member

@tarzan tarzan commented Feb 18, 2024

So we got this scenario where a client calls our API every 24hrs and calls the token endpoint first every time. Now this token endpoint will just return the currently valid token. But seeing as this token is valid for exactly 24hrs he now sometimes ends up with an invalid token for his request.
I changed the behavior to have the endpoint only return a currently valid access token when it does not expire within the next 5 minutes. always generate a new token on valid client credentials.

@tarzan tarzan force-pushed the maarten/refresh-token-when-expires-within-5-minutes branch from 3891776 to ae10bdd Compare February 19, 2024 07:45
@tarzan tarzan changed the title Maarten/refresh token when expires within 5 minutes Always regenerate a new token on valid client credentials Feb 19, 2024
@tarzan tarzan force-pushed the maarten/refresh-token-when-expires-within-5-minutes branch from ae10bdd to ca6e5d0 Compare February 19, 2024 22:53
@tarzan tarzan merged commit 2673725 into master Feb 19, 2024
4 checks passed
@tarzan tarzan deleted the maarten/refresh-token-when-expires-within-5-minutes branch February 19, 2024 22:54
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

Successfully merging this pull request may close these issues.

2 participants