-
Notifications
You must be signed in to change notification settings - Fork 231
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
Added TTL renewal of credentials in CredentialsManager [SDK-1818] #399
Conversation
@danielphillips @Tauseef-TL We had a think about your use case and wanted to have a consistent story across the native SDKs, starting with iOS. Would be great to get your feedback on the functionality added in this PR (snippet included) and ensure it also solves your use case. |
@lbalmaceda please can you review to ensure it aligns with your expectations around the discovery and as a heads up for Android. Thx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a method I wouldn't add to the SDK. The rest looks good, I left some comments.
@cocojoe From initial review, it appears that this should cover our usecases/requirements. I will need to spike this with our codebase in order to fully verify this. |
@Widcket I cannot comment on the diff because this method hasn't changed, but note that it also needs to accept the Auth0.swift/Auth0/CredentialsManager.swift Line 123 in b02ee11
|
Good catch, I added the |
This is now out on v1.27.0. |
Changes
minTTL
parameter to thecredentials(withScope:callback:)
method to force renew the Access Token unless it remains valid for a certain amount of time, and to ensure the minimum lifetime of the renewed Access Token. This guarantees that the retrieved Access Token will always remain valid for at leastminTTL
.minTTL
parameter to thehasValid()
method to check that the Access Token will remain valid for at least a certain amount of time.scope
parameter to force renew the Access Token when requesting a reduced scope than originally granted.References
Replaces #395
Testing
Checklist