From 9c67ee73757bc36dae9d9e1c9542bddeef8b26e8 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:43:56 -0500 Subject: [PATCH] fix: pass `upId` to JWT if logging in through SAML (#17566) * pass `upId` to JWT if logging in through SAML * Correct change --- packages/features/auth/lib/next-auth-options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/features/auth/lib/next-auth-options.ts b/packages/features/auth/lib/next-auth-options.ts index 3feb979677..3c51b393c7 100644 --- a/packages/features/auth/lib/next-auth-options.ts +++ b/packages/features/auth/lib/next-auth-options.ts @@ -564,7 +564,7 @@ export const getOptions = ({ if (account.type === "credentials") { // return token if credentials,saml-idp if (account.provider === "saml-idp") { - return token; + return { ...token, upId: user.profile?.upId ?? token.upId ?? null } as JWT; } // any other credentials, add user info return {