Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

#250 Changed revokeAtuhorizationCode to expect a boolean rather than ... #274

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

Merged
mjsalinger merged 2 commits into oauthjs:master from mjsalinger:250-revoke-grant-code-fix
Oct 24, 2016

Conversation

@mjsalinger
Copy link
Contributor

@mjsalinger mjsalinger commented Mar 14, 2016

Fixes #250

Changes the expectation of model.revokeAuthorizationCode from an auth code to a boolean.

steffansluis, visvk, maxtruxa, and tejasmob reacted with thumbs up emoji
maxtruxa added a commit to maxtruxa/node-oauth2-server that referenced this pull request May 24, 2016
Copy link
Collaborator

nunofgs commented Aug 26, 2016

Hi @mjsalinger, what was the reasoning for removing the revocation checks? I felt they were useful (from the point of view of this module) to validate that the code was actually revoked.

Can you share your use-case for this?

Copy link
Member

IMO the check was counter-intuitive. The fact that there was at least one issue reporting this as a "bug" supports this.

Even if someone implemented the revocation function correctly, the only case where the check was actually useful was when the actual revocation was implemented like this:

  • update the database record with an expiration date in the past
  • return the updated database record

If revocation is implemented in any other way (let's say, deletion of the database record), the check is effectively testing if the user wrote one additional line of code: Pretending to have expired the token.

Copy link
Contributor Author

Agreed, a revoked token isn't necessarily an expired token. In our use case, we also deleted the token from the database rather than add an expiration. It seemed counterintuitive to and was causing issues with our backend as well as others (#290, #250). The consensus seemed to be to make it a boolean and leave the details of how the token was revoked to the model.

@mjsalinger mjsalinger merged commit cd1f777 into oauthjs:master Oct 24, 2016
@mjsalinger mjsalinger deleted the 250-revoke-grant-code-fix branch October 24, 2016 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@maxtruxa maxtruxa maxtruxa approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /