From fa524e3b05b287bf177e7aa3799718ec16ca9d2e 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. --- 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 ebb34b342..4f49146b0 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 4f26be7d2..7eb6a3b65 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 af0d5967e..9cf8bf482 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 5e4c64a84..f51ab54ce 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 6302f6b4f..70c5590b8 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 e6111e952..af8748c3a 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 09d9fb5e4..304c79623 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 214c4eb9e..0165cb70f 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) && (