Merged in fix/dtmc-debugging (pull request #2683)
Chore: DTMC Logging * chore: DTMC debugging * fix: prune dtmc logging * fix: Add id's from azure in error logging Approved-by: Linus Flood Approved-by: Matilda Landström
This commit is contained in:
@@ -88,6 +88,8 @@ async function linkEmployeeToUser(
|
||||
case 403:
|
||||
queryParam = "forbidden"
|
||||
break
|
||||
case 500:
|
||||
queryParam = "internal_server_error"
|
||||
}
|
||||
return {
|
||||
success: false,
|
||||
|
||||
@@ -88,11 +88,23 @@ const config = {
|
||||
) {
|
||||
const employeeId = profile["user.employeeid"]
|
||||
if (employeeId && typeof employeeId === "string") {
|
||||
logger.info(
|
||||
"[auth.dtmc] DTMC authentication successful - employeeId extracted"
|
||||
)
|
||||
return {
|
||||
access_token: "", // JWT requires it, but DTMC does not need it, so save on cookie size by using empty string
|
||||
loginType: "dtmc",
|
||||
employeeId,
|
||||
}
|
||||
} else {
|
||||
logger.error(
|
||||
"[auth.dtmc] DTMC authentication failed - no employeeId found in Microsoft profile. Check Azure app registration optional claims configuration.",
|
||||
{
|
||||
userObjectId: profile.oid,
|
||||
tenantId: profile.tid,
|
||||
clientId: profile.aud,
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user