diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index b34cadc..3fdeeb3 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -153,12 +153,15 @@ export class AuthService { // Validate the response shape if (!data?.keys || !Array.isArray(data.keys)) { + console.log("failed to get pub keys"); + throw new UnauthorizedException('Authentication failed'); } // Find the key with the matching kid const key = data.keys.find((k) => k.kid === kid); if (!key) { + console.log("failed to get pub key from keys"); throw new UnauthorizedException('Authentication failed'); }