From af71715fd636bb96cef414debfaf8bcd048fe015 Mon Sep 17 00:00:00 2001 From: Kallesh B S Date: Fri, 26 Sep 2025 09:17:20 +0530 Subject: [PATCH] fix 2 --- src/auth/auth.service.ts | 3 +++ 1 file changed, 3 insertions(+) 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'); }