diff --git a/lib/grant-types/authorization-code-grant-type.js b/lib/grant-types/authorization-code-grant-type.js index 556ec72..71de6c2 100644 --- a/lib/grant-types/authorization-code-grant-type.js +++ b/lib/grant-types/authorization-code-grant-type.js @@ -53,8 +53,8 @@ class AuthorizationCodeGrantType extends AbstractGrantType { } const code = await this.getAuthorizationCode(request, client); - await this.validateRedirectUri(request, code); await this.revokeAuthorizationCode(code); + await this.validateRedirectUri(request, code); return this.saveToken(code.user, client, code.authorizationCode, code.scope); }