From b8d589931dba7dfd299667a0659d94f655a1f0ce Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Mon, 23 Jun 2025 14:07:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Always=20transform=20undefined?= =?UTF-8?q?=20to=20null=20values=20for=20user=20name=20and=20image=20in=20?= =?UTF-8?q?OAuth=20profile=20extraction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2199 --- apps/builder/src/features/auth/lib/providers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/builder/src/features/auth/lib/providers.ts b/apps/builder/src/features/auth/lib/providers.ts index 76fe743d4..875cc65b4 100644 --- a/apps/builder/src/features/auth/lib/providers.ts +++ b/apps/builder/src/features/auth/lib/providers.ts @@ -132,9 +132,9 @@ if (env.CUSTOM_OAUTH_ISSUER) { profile(profile) { const user = { id: getAtPath(profile, env.CUSTOM_OAUTH_USER_ID_PATH), - name: getAtPath(profile, env.CUSTOM_OAUTH_USER_NAME_PATH), + name: getAtPath(profile, env.CUSTOM_OAUTH_USER_NAME_PATH) ?? null, email: getAtPath(profile, env.CUSTOM_OAUTH_USER_EMAIL_PATH), - image: getAtPath(profile, env.CUSTOM_OAUTH_USER_IMAGE_PATH), + image: getAtPath(profile, env.CUSTOM_OAUTH_USER_IMAGE_PATH) ?? null, }; return userSchema .pick({ id: true, email: true, name: true, image: true })