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

Ensure the default URLSession for OAuth2Client is ephemeral #152

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

mikenachbaur-okta
Copy link
Contributor

@mikenachbaur-okta mikenachbaur-okta commented Aug 24, 2023

Certain versions of macOS provides a URLSession.shared instance that uses a persistent URL cache, whereas newer versions do not. Since the /oauth2/v1/keys endpoint has a long cache expiry (~= 10 days), when keys are rotated on the server, users may not be unable to sign in unless they clear the cache (or delete and reinstall the app).

Since other parts of the SDK explicitly uses an ephemeral session already, this looks an oversight, so it’s good to make our uses of URLSession consistent across the SDK.

Copy link

@IldarAbdullin-okta IldarAbdullin-okta left a comment

Choose a reason for hiding this comment

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

LGTM!

@mikenachbaur-okta mikenachbaur-okta merged commit 1aa3504 into master Aug 24, 2023
10 checks passed
@mikenachbaur-okta mikenachbaur-okta deleted the mn-OKTA-641423 branch August 24, 2023 18:18
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.

3 participants