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

SDKS-2563 - Making "refresh" and "refreshSync" methods Public #220

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

george-bafaloukas-forgerock
Copy link
Contributor

  • Making "refresh" and "refreshSync" methods Public
  • Updating tests

JIRA Ticket

Please, link jira ticket here.
SDKS-2563

Copy link
Contributor

@vahancouver vahancouver left a comment

Choose a reason for hiding this comment

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

Changes look good

Copy link
Contributor

@spetrov spetrov left a 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.

@george-bafaloukas-forgerock
Copy link
Contributor Author

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.

@spetrov spetrov merged commit a37a1b6 into develop Jul 5, 2023
@spetrov spetrov deleted the SDKS-2563-Force_Refresh_Tokens branch July 5, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants