From 7a655f7c6e1ade43a155c6686ab756aa4806fd88 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Tue, 29 Sep 2026 10:08:15 -0400 Subject: [PATCH] show device code on device authorize screen --- messages/en-US.json | 1 + src/components/DeviceAuthConfirmation.tsx | 19 +++++++++++++++---- src/components/DeviceLoginForm.tsx | 9 +++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index cfa151c90..7e2d0e5b2 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -3741,6 +3741,7 @@ "deviceCodeVerifying": "Verifying device authorization...", "signedInAs": "Signed in as", "deviceCodeEnterPrompt": "Enter the code displayed on the device", + "deviceCodeConfirmPrompt": "Confirm this matches the code on your device", "continue": "Continue", "deviceUnknownLocation": "Unknown location", "deviceAuthorizationRequested": "This authorization was requested from {location} on {date}. Make sure you trust this device as it will get access to the account.", diff --git a/src/components/DeviceAuthConfirmation.tsx b/src/components/DeviceAuthConfirmation.tsx index c1ea8a0ad..8645b00a3 100644 --- a/src/components/DeviceAuthConfirmation.tsx +++ b/src/components/DeviceAuthConfirmation.tsx @@ -25,6 +25,7 @@ type DeviceAuthMetadata = { type DeviceAuthConfirmationProps = { metadata: DeviceAuthMetadata; + code: string; onConfirm: () => void; onCancel: () => void; loading: boolean; @@ -32,6 +33,7 @@ type DeviceAuthConfirmationProps = { export function DeviceAuthConfirmation({ metadata, + code, onConfirm, onCancel, loading @@ -87,9 +89,18 @@ export function DeviceAuthConfirmation({
+
+

+ {t("deviceCodeConfirmPrompt")} +

+

+ {code} +

+
+
- -
+ +

{metadata.applicationName}

@@ -112,11 +123,11 @@ export function DeviceAuthConfirmation({

- + {t("deviceFullAccess")}
- + {t("deviceOrganizationsAccess")}
diff --git a/src/components/DeviceLoginForm.tsx b/src/components/DeviceLoginForm.tsx index 77ed06449..57b60f3fd 100644 --- a/src/components/DeviceLoginForm.tsx +++ b/src/components/DeviceLoginForm.tsx @@ -268,6 +268,7 @@ export default function DeviceLoginForm({ return ( { // Strip hyphens and convert to uppercase