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

Avoid auth v2 refresh token reuse on JWKs fetch error #5520

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

lmac012
Copy link
Contributor

@lmac012 lmac012 commented Jan 23, 2025

Task/Issue URL: https://app.asana.com/0/1205648422731273/1209217826294377/f

Description

This PR ensures JWKs are fetched before refreshing auth v2 tokens. Existing refresh token may be invalidated upon obtaining new one. If fetching JWKs fails for any reason, the app can't validate and store new token and is left with an invalid refresh token.

Steps to test this PR

QA - optional

No UI changes

Copy link
Contributor Author

lmac012 commented Jan 23, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lmac012 lmac012 marked this pull request as ready for review January 23, 2025 10:55
@lmac012 lmac012 requested a review from karlenDimla January 23, 2025 10:55
Copy link
Contributor

@karlenDimla karlenDimla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lmac012 lmac012 force-pushed the fix/lukasz/auth-v2-jwks-fetch-error-handling branch from 75f6de8 to 5dc5fb8 Compare January 23, 2025 12:44
@lmac012 lmac012 enabled auto-merge (squash) January 23, 2025 12:47
@lmac012 lmac012 merged commit 23df15c into develop Jan 23, 2025
6 checks passed
@lmac012 lmac012 deleted the fix/lukasz/auth-v2-jwks-fetch-error-handling branch January 23, 2025 12:58
anikiki pushed a commit that referenced this pull request Jan 23, 2025
Task/Issue URL:
https://app.asana.com/0/1205648422731273/1209217826294377/f

### Description

This PR ensures JWKs are fetched before refreshing auth v2 tokens.
Existing refresh token may be invalidated upon obtaining new one. If
fetching JWKs fails for any reason, the app can't validate and store new
token and is left with an invalid refresh token.

### Steps to test this PR

QA - optional

### No UI changes
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