diff --git a/packages/server/modules/workspaces/rest/sso.ts b/packages/server/modules/workspaces/rest/sso.ts index fb4eda8c9..622b2f9c2 100644 --- a/packages/server/modules/workspaces/rest/sso.ts +++ b/packages/server/modules/workspaces/rest/sso.ts @@ -686,7 +686,7 @@ const tryGetSpeckleUserDataFactory = // Get user with email that matches OIDC provider user email, if match exists const providerEmail = getEmailFromOidcProfile(oidcProviderUserData) - const userEmail = await findEmail({ email: providerEmail }) + const userEmail = await findEmail({ email: providerEmail.toLowerCase() }) if (!!userEmail && !userEmail.verified) throw new SsoUserEmailUnverifiedError() const existingSpeckleUser = await getUser(userEmail?.userId ?? '')