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

Ability to drop cache #188

Open
5 tasks done
inemtsev opened this issue Sep 3, 2023 · 2 comments
Open
5 tasks done

Ability to drop cache #188

inemtsev opened this issue Sep 3, 2023 · 2 comments
Labels
feature request A feature has been asked for or suggested by the community

Comments

@inemtsev
Copy link

inemtsev commented Sep 3, 2023

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

Some jwk providers rotate their keys (AWS for example), their documentation says that if issuer matches but keyId is wrong, to get latest JWK keys. This is not possible with the current caching of this library.
https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-verifying-a-jwt.html

Describe the ideal solution

Perhaps there should be an exposed function to drop the cache or try to pull latest before throwing an Exception?

Alternatives and current workarounds

No response

Additional context

No response

@inemtsev inemtsev added the feature request A feature has been asked for or suggested by the community label Sep 3, 2023
@jimmyjames
Copy link
Contributor

Thanks @inemtsev, we'll look into perhaps exposing an ability to drop the cache, though need to think through how this would be leveraged (i.e., how to know when to drop the cache, versus just configuring the provider to not cache at all).

@inemtsev
Copy link
Author

Thanks @inemtsev, we'll look into perhaps exposing an ability to drop the cache, though need to think through how this would be leveraged (i.e., how to know when to drop the cache, versus just configuring the provider to not cache at all).

For AWS at least, they ask to drop the cache if the keyId cannot be found among the ones cached before. (Since they provide multiple keyIds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

2 participants