-
Notifications
You must be signed in to change notification settings - Fork 26
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
SDKS-2563 - Making "refresh" and "refreshSync" methods Public #220
Conversation
Updating tests
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.
Changes look good
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.
@george-bafaloukas-forgerock, the changes look good to me.
However, during testing, I realized that refreshing the access_token does not revoke the previous one. I thought AM would automatically invalidate it, but it only invalidates the refresh_token...
It looks to me it is up to the client to revoke the old access_token, and we currently don't do that, so I would like to discuss this with you and the team before merging and releasing this change...
Here are the relevant parts from RFC 6749:
Refresh tokens are issued to the client by the authorization server and are
used to obtain a new access token when the current access token
becomes invalid or expires, or to obtain additional access tokens
with identical or narrower scope
The authorization server MAY revoke the old
refresh token after issuing a new refresh token to the client.
I don't see a problem for this. Future planned changes can give more finer grained controlled to revoke the AccessToken. However, when you force refresh, the SDK will delete the Local "old" AccessToken and replace it with the new one. The "old" token will still be valid on the server and will expire soon. From a security perspective the AccessTokens should be short lived. |
JIRA Ticket
Please, link jira ticket here.
SDKS-2563