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

Add switch to prevent revoking of refresh tokens. #1189

Merged
merged 8 commits into from
Jun 3, 2021

Conversation

janhopman-nhb
Copy link

Hi,
Recently we (my colleagues and i) came across a specific use case in our software which uses oauth2-server where we needed to prevent refresh tokens to be revoked after requesting a new access token. We looked at the ouath rfc and read that this behaviour is allowed according to the spec. I've gone ahead and implemented the change in this pull request. See below for references to the specific information on refresh tokens in the rfc.

According to section 1.5, issuing a new refresh token is optional (see step H).
Also according to section 4.1 which describes the authorization code grant type, the refresh token is optional (see step E).
Finally according to section 6 (Refreshing an Access token), in the last paragraph it states that the server MAY issue a new refresh token.
And also states that the server MAY revoke the old refresh token.

Hoping someone can take a look at this, any suggestions and/or feedback, would be much appreciated!

@Sephster
Copy link
Member

Thanks @janhopman-nhb - is there a way to implement this that won't break BC? If not, I think we will leave this PR for now. I also want to change refresh tokens so they don't have an expiration as this isn't part of the spec so would like to roll that into one as part of a major release. Thanks

@janhopman-nhb
Copy link
Author

Hi @Sephster, Thank you for your reply! We will have a look if we can implement without breaking BC.

@janhopman-nhb
Copy link
Author

Hi @Sephster, is it possible to approve running the workflows by any chance?

@Sephster
Copy link
Member

Done, thanks!

@janhopman-nhb
Copy link
Author

@Sephster Really sorry for bothering you... 😅 Just fixed the bc issue i think, but the workflows need to be triggerd again to confirm...

Copy link
Member

@Sephster Sephster left a comment

Choose a reason for hiding this comment

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

Thank you - a few comments but this is looking good thanks!

@janhopman-nhb janhopman-nhb requested a review from Sephster June 1, 2021 11:45
@Sephster
Copy link
Member

Sephster commented Jun 3, 2021

LGTM - thank you for your work on this @janhopman-nhb

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.

2 participants