From 385226fa870a3252524d106a9c5118cc85049f60 Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Tue, 28 Oct 2025 13:35:47 +0100 Subject: [PATCH] fix(login): Return promise from passkey authentication to fix automatic prompt (#10991) # Which Problems Are Solved The passkey login page was not rendering properly in production (Cloud Run) deployments, with the submit button and component content not appearing. Additionally, the automatic passkey prompt was not triggering correctly. # How the Problems Are Solved Added the missing return statement before navigator.credentials.get() in the submitLoginAndContinue function. This ensures the promise is properly returned and chained in the useEffect hook, fixing the automatic passkey prompt flow. Removes the recently introduces guides to passkeys that could result in a hydration error due to the tag being rendered differently on server / client environement # Additional Changes This issue was most probably introduced in PR #10971. The component uses promise chaining (.then().catch().finally()) which requires the promise to be returned, unlike the RegisterPasskey component which uses async/await and works correctly without an explicit return. (cherry picked from commit fa524e3b05b287bf177e7aa3799718ec16ca9d2e) --- apps/login/locales/de.json | 4 ---- apps/login/locales/en.json | 4 ---- apps/login/locales/es.json | 4 ---- apps/login/locales/it.json | 4 ---- apps/login/locales/pl.json | 4 ---- apps/login/locales/ru.json | 4 ---- apps/login/locales/zh.json | 4 ---- apps/login/src/app/(login)/passkey/page.tsx | 21 +++++---------------- apps/login/src/components/login-passkey.tsx | 3 ++- 9 files changed, 7 insertions(+), 45 deletions(-) diff --git a/apps/login/locales/de.json b/apps/login/locales/de.json index ebb34b34261..4f49146b07e 100644 --- a/apps/login/locales/de.json +++ b/apps/login/locales/de.json @@ -261,10 +261,6 @@ "verify": { "title": "Mit einem Passkey authentifizieren", "description": "Ihr Gerät wird nach Ihrem Fingerabdruck, Gesicht oder Bildschirmsperre fragen", - "info": { - "description": "Verwenden Sie den von Ihnen eingerichteten Passkey, um sich sicher zu authentifizieren. ", - "link": "Mehr über Passkeys erfahren" - }, "usePassword": "Passwort verwenden", "submit": "Weiter", "errors": { diff --git a/apps/login/locales/en.json b/apps/login/locales/en.json index 4f26be7d211..7eb6a3b65fa 100644 --- a/apps/login/locales/en.json +++ b/apps/login/locales/en.json @@ -261,10 +261,6 @@ "verify": { "title": "Authenticate with a passkey", "description": "Your device will ask for your fingerprint, face, or screen lock", - "info": { - "description": "Use the passkey you set up to authenticate securely. ", - "link": "Learn more about Passkeys" - }, "usePassword": "Use password", "submit": "Continue", "errors": { diff --git a/apps/login/locales/es.json b/apps/login/locales/es.json index af0d5967ef3..9cf8bf482d3 100644 --- a/apps/login/locales/es.json +++ b/apps/login/locales/es.json @@ -261,10 +261,6 @@ "verify": { "title": "Autenticar con una clave de acceso", "description": "Tu dispositivo pedirá tu huella digital, rostro o bloqueo de pantalla", - "info": { - "description": "Usa la clave de acceso que configuraste para autenticarte de forma segura. ", - "link": "Más información sobre claves de acceso" - }, "usePassword": "Usar contraseña", "submit": "Continuar", "errors": { diff --git a/apps/login/locales/it.json b/apps/login/locales/it.json index 5e4c64a8400..f51ab54ce6b 100644 --- a/apps/login/locales/it.json +++ b/apps/login/locales/it.json @@ -261,10 +261,6 @@ "verify": { "title": "Autenticati con una passkey", "description": "Il tuo dispositivo chiederà la tua impronta digitale, il volto o il blocco schermo", - "info": { - "description": "Usa la passkey che hai configurato per autenticarti in modo sicuro. ", - "link": "Scopri di più sulle Passkey" - }, "usePassword": "Usa password", "submit": "Continua", "errors": { diff --git a/apps/login/locales/pl.json b/apps/login/locales/pl.json index 6302f6b4fbb..70c5590b8a9 100644 --- a/apps/login/locales/pl.json +++ b/apps/login/locales/pl.json @@ -261,10 +261,6 @@ "verify": { "title": "Uwierzytelnij się za pomocą klucza dostępu", "description": "Twoje urządzenie poprosi o użycie odcisku palca, rozpoznawania twarzy lub blokady ekranu.", - "info": { - "description": "Użyj skonfigurowanego klucza dostępu, aby bezpiecznie się uwierzytelnić. ", - "link": "Dowiedz się więcej o kluczach dostępu" - }, "usePassword": "Użyj hasła", "submit": "Kontynuuj", "errors": { diff --git a/apps/login/locales/ru.json b/apps/login/locales/ru.json index e6111e952a0..af8748c3a06 100644 --- a/apps/login/locales/ru.json +++ b/apps/login/locales/ru.json @@ -261,10 +261,6 @@ "verify": { "title": "Аутентификация с помощью пасскей", "description": "Устройство запросит отпечаток пальца, лицо или экранный замок", - "info": { - "description": "Используйте настроенную пасскей для безопасной аутентификации. ", - "link": "Узнать больше о пасскеях" - }, "usePassword": "Использовать пароль", "submit": "Продолжить", "errors": { diff --git a/apps/login/locales/zh.json b/apps/login/locales/zh.json index 09d9fb5e402..304c79623c5 100644 --- a/apps/login/locales/zh.json +++ b/apps/login/locales/zh.json @@ -261,10 +261,6 @@ "verify": { "title": "使用密钥认证", "description": "您的设备将请求指纹、面部识别或屏幕锁", - "info": { - "description": "使用您设置的密钥进行安全认证。", - "link": "了解更多关于密钥" - }, "usePassword": "使用密码", "submit": "继续", "errors": { diff --git a/apps/login/src/app/(login)/passkey/page.tsx b/apps/login/src/app/(login)/passkey/page.tsx index 214c4eb9ea2..0165cb70f4c 100644 --- a/apps/login/src/app/(login)/passkey/page.tsx +++ b/apps/login/src/app/(login)/passkey/page.tsx @@ -1,4 +1,4 @@ -import { Alert, AlertType } from "@/components/alert"; +import { Alert } from "@/components/alert"; import { DynamicTheme } from "@/components/dynamic-theme"; import { LoginPasskey } from "@/components/login-passkey"; import { Translated } from "@/components/translated"; @@ -71,24 +71,13 @@ export default async function Page(props: { searchParams: Promise
- - - - - - - - - - {!(loginName || sessionId) ? ( + {!(loginName || sessionId) && ( - ) : ( + )} + + {(loginName || sessionId) && (