test(server): auth tests (#6135)

This commit is contained in:
forehalo
2024-03-26 02:24:17 +00:00
parent 1c9d899831
commit 1a1af83375
19 changed files with 1058 additions and 96 deletions

View File

@@ -40,7 +40,7 @@ export class OAuthController {
const provider = this.providerFactory.get(providerName);
if (!provider) {
throw new BadRequestException('Invalid provider');
throw new BadRequestException('Invalid OAuth provider');
}
const state = await this.oauth.saveOAuthState({

View File

@@ -16,7 +16,7 @@ export function registerOAuthProvider(
@Injectable()
export class OAuthProviderFactory {
get providers() {
return PROVIDERS.keys();
return Array.from(PROVIDERS.keys());
}
get(name: OAuthProviderName): OAuthProvider | undefined {