make username lowercase

This commit is contained in:
miloschwartz
2025-06-19 15:41:49 -04:00
parent 58ba0d07b0
commit 1bf2e23f5d
8 changed files with 18 additions and 15 deletions

View File

@@ -172,10 +172,10 @@ export async function validateOidcCallback(
const claims = arctic.decodeIdToken(idToken);
logger.debug("ID token claims", { claims });
const userIdentifier = jmespath.search(
let userIdentifier = jmespath.search(
claims,
existingIdp.idpOidcConfig.identifierPath
);
) as string | null;
if (!userIdentifier) {
return next(
@@ -186,6 +186,8 @@ export async function validateOidcCallback(
);
}
userIdentifier = userIdentifier.toLowerCase();
logger.debug("User identifier", { userIdentifier });
let email = null;