From a533fa8e8e417f9a0733c5f5f8d657ce33a4c8df Mon Sep 17 00:00:00 2001 From: tkallady Date: Wed, 11 Mar 2026 10:29:17 +1100 Subject: [PATCH 1/2] Started Log AMR From a38143fba1b58de2b7f6319f812586f5f47a0d1c Mon Sep 17 00:00:00 2001 From: tkallady Date: Thu, 12 Mar 2026 10:03:19 +1100 Subject: [PATCH 2/2] Console log token claims --- .../backend/src/controllers/AuthController.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/application/backend/src/controllers/AuthController.ts b/application/backend/src/controllers/AuthController.ts index 92c6a699..f8bb6d3a 100644 --- a/application/backend/src/controllers/AuthController.ts +++ b/application/backend/src/controllers/AuthController.ts @@ -312,15 +312,21 @@ export class AuthController extends Controller { method: 'POST', }) - const { access_token } = await token_res.json() + const { access_token, id_token } = await token_res.json() + + if (id_token) { + const [, payload] = id_token.split('.') + const decodedIdToken = JSON.parse(Buffer.from(payload, 'base64').toString()) + console.log('Auth Claims', decodedIdToken) + } const userinfo_res = await fetch(userinfo_endpoint, { body: new URLSearchParams({ access_token }), method: 'POST', }) - const { email } = await userinfo_res.json() - user = await this.userRepo.findFirst({ where: { email } }) + const userinfo = await userinfo_res.json() + user = await this.userRepo.findFirst({ where: { email: userinfo.email } }) } catch { throw new Error('Error authenticating with OIDC') }