From 48178cd4eafda8a6a39700beb276694444d90ecb Mon Sep 17 00:00:00 2001 From: Simon Emanuelsson Date: Thu, 22 Aug 2024 08:39:16 +0200 Subject: [PATCH] fix: profile_update scope typo fix --- app/[lang]/(live)/(public)/login/route.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/[lang]/(live)/(public)/login/route.ts b/app/[lang]/(live)/(public)/login/route.ts index 91668330e..d036fbc4c 100644 --- a/app/[lang]/(live)/(public)/login/route.ts +++ b/app/[lang]/(live)/(public)/login/route.ts @@ -118,9 +118,10 @@ export async function GET( */ console.log(`[login] final redirectUrl: ${redirectTo}`) console.log({ login_env: process.env }) - const params = { + /** Record is next-auth typings */ + const params: Record = { ui_locales: context.params.lang, - scope: ["openid", "profile"].join(" "), + scope: ["openid", "profile"], /** * The `acr_values` param is used to make Curity display the proper login * page for Scandic. Without the parameter Curity presents some choices @@ -140,7 +141,7 @@ export async function GET( if (isMFA) { // Append profile_update scope for MFA - params.scope = params.scope + " profile_udpate" + params.scope.push("profile_update") /** * The below acr value is required as for New Web same Curity Client is used for MFA * while in current web it is being setup using different Curity Client @@ -150,7 +151,7 @@ export async function GET( } else if (isSeamlessMagicLink) { params.acr_values = "abc" } - + params.scope = params.scope.join(" ") const redirectUrl = await signIn( "curity", {