Merged in fix/profile-update-scope (pull request #443)
fix: profile_update scope typo fix Approved-by: Michael Zetterberg
This commit is contained in:
@@ -118,9 +118,10 @@ export async function GET(
|
|||||||
*/
|
*/
|
||||||
console.log(`[login] final redirectUrl: ${redirectTo}`)
|
console.log(`[login] final redirectUrl: ${redirectTo}`)
|
||||||
console.log({ login_env: process.env })
|
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,
|
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
|
* The `acr_values` param is used to make Curity display the proper login
|
||||||
* page for Scandic. Without the parameter Curity presents some choices
|
* page for Scandic. Without the parameter Curity presents some choices
|
||||||
@@ -140,7 +141,7 @@ export async function GET(
|
|||||||
|
|
||||||
if (isMFA) {
|
if (isMFA) {
|
||||||
// Append profile_update scope for MFA
|
// 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
|
* 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
|
* while in current web it is being setup using different Curity Client
|
||||||
@@ -150,7 +151,7 @@ export async function GET(
|
|||||||
} else if (isSeamlessMagicLink) {
|
} else if (isSeamlessMagicLink) {
|
||||||
params.acr_values = "abc"
|
params.acr_values = "abc"
|
||||||
}
|
}
|
||||||
|
params.scope = params.scope.join(" ")
|
||||||
const redirectUrl = await signIn(
|
const redirectUrl = await signIn(
|
||||||
"curity",
|
"curity",
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user