diff --git a/src/authorization_server.ts b/src/authorization_server.ts index 07e6038c..d9df4ca7 100644 --- a/src/authorization_server.ts +++ b/src/authorization_server.ts @@ -104,6 +104,7 @@ export class AuthorizationServer { refresh_token: new RefreshTokenGrant(...grantProps), implicit: new ImplicitGrant(...grantProps), }; + this.enableGrantTypes("client_credentials", "refresh_token"); } enableGrantTypes(...grants: EnableGrant[]): void { diff --git a/test/e2e/authorization_server.spec.ts b/test/e2e/authorization_server.spec.ts index e0eb515c..1f5ab4fd 100644 --- a/test/e2e/authorization_server.spec.ts +++ b/test/e2e/authorization_server.spec.ts @@ -69,13 +69,11 @@ describe("authorization_server", () => { authCodeRepository: inMemoryAuthCodeRepository, userRepository: inMemoryUserRepository, }); - authorizationServer.enableGrantType("client_credentials"); authorizationServer.enableGrantType("implicit"); authorizationServer.enableGrantType({ grant: "password", userRepository: inMemoryUserRepository, }); - authorizationServer.enableGrantType("refresh_token"); const customGrant = new MyCustomGrant( inMemoryClientRepository, inMemoryAccessTokenRepository, @@ -202,7 +200,6 @@ describe("authorization_server", () => { inMemoryScopeRepository, new JwtService("secret-key"), ); - authorizationServer.enableGrantType("refresh_token"); const request = new OAuthRequest({ query: { response_type: "code",