Skip to content

Commit c533607

Browse files
authored
fix: revoke code before validating redirect uri
Merge pull request #232 from jorenvandeweyer/bugfix/revoke-authorization-code-earlier-4.x thanks to @jorenvandeweyer
2 parents 25c3661 + 20696ba commit c533607

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/grant-types/authorization-code-grant-type.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ AuthorizationCodeGrantType.prototype.handle = function(request, client) {
6767
return this.getAuthorizationCode(request, client);
6868
})
6969
.tap(function(code) {
70-
return this.validateRedirectUri(request, code);
70+
return this.revokeAuthorizationCode(code);
7171
})
7272
.tap(function(code) {
73-
return this.revokeAuthorizationCode(code);
73+
return this.validateRedirectUri(request, code);
7474
})
7575
.then(function(code) {
7676
return this.saveToken(code.user, client, code.authorizationCode, code.scope);

0 commit comments

Comments
 (0)