fix: profile_update scope typo fix

This commit is contained in:
Simon Emanuelsson
2024-08-22 08:39:16 +02:00
parent 2361ba696d
commit 48178cd4ea

View File

@@ -118,9 +118,10 @@ export async function GET(
*/
console.log(`[login] final redirectUrl: ${redirectTo}`)
console.log({ login_env: process.env })
const params = {
/** Record<string, any> is next-auth typings */
const params: Record<string, any> = {
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",
{