chore: auth unit tests (#13207)

This commit is contained in:
Daniel Dietzler 2024-10-05 18:16:23 +02:00 committed by GitHub
parent 0f3b8b67fe
commit 9d9bf1c88d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 53 additions and 5 deletions

View file

@ -192,10 +192,6 @@ export class AuthService extends BaseService {
async authorize(dto: OAuthConfigDto): Promise<OAuthAuthorizeResponseDto> {
const config = await this.getConfig({ withCache: false });
if (!config.oauth.enabled) {
throw new BadRequestException('OAuth is not enabled');
}
const client = await this.getOAuthClient(config);
const url = client.authorizationUrl({
redirect_uri: this.normalize(config, dto.redirectUri),