Skip to content

Commit 48baa8b

Browse files
authored
fix: revoke code before validating redirect uri
Merge pull request #231 from jorenvandeweyer/bugfix/revoke-authorization-code-earlier thanks to @jorenvandeweyer
2 parents aaf28b4 + 8dfd3cc commit 48baa8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class AuthorizationCodeGrantType extends AbstractGrantType {
5353
}
5454

5555
const code = await this.getAuthorizationCode(request, client);
56-
await this.validateRedirectUri(request, code);
5756
await this.revokeAuthorizationCode(code);
57+
await this.validateRedirectUri(request, code);
5858

5959
return this.saveToken(code.user, client, code.authorizationCode, code.scope);
6060
}

0 commit comments

Comments
 (0)