fix: Passkeys not supported in desktop (#11072)

This commit is contained in:
Tom Moor
2026-01-05 21:20:32 -05:00
committed by GitHub
parent 468f5dbf20
commit 8b6b8039c5
3 changed files with 25 additions and 8 deletions
+1
View File
@@ -35,6 +35,7 @@ You're an expert in the following areas:
- Emphasize type safety and static analysis.
- Follow consistent Prettier formatting.
- Do not replace smart quotes ("") or ('') with simple quotes ("").
- Do not add translation strings manually; they will be extracted automatically from the codebase.
## Dependencies and Upgrading
@@ -8,6 +8,7 @@ import { Client } from "@shared/types";
import ButtonLarge from "~/components/ButtonLarge";
import InputLarge from "~/components/InputLarge";
import PluginIcon from "~/components/PluginIcon";
import Tooltip from "~/components/Tooltip";
import { client } from "~/utils/ApiClient";
import Desktop from "~/utils/Desktop";
import { getRedirectUrl } from "../urls";
@@ -120,6 +121,19 @@ function AuthenticationProvider(props: Props) {
}
};
const isDesktop = Desktop.isElectron();
const button = (
<ButtonLarge
type="submit"
icon={<PluginIcon id={id} color="currentColor" />}
fullwidth
disabled={isDesktop}
{...rest}
>
{t("Continue with Passkey")}
</ButtonLarge>
);
return (
<Wrapper>
<Form
@@ -128,14 +142,15 @@ function AuthenticationProvider(props: Props) {
action="/auth/passkeys.verifyAuthentication"
onSubmit={handleSubmitPasskey}
>
<ButtonLarge
type="submit"
icon={<PluginIcon id={id} color="currentColor" />}
fullwidth
{...rest}
>
{t("Continue with Passkey")}
</ButtonLarge>
{isDesktop ? (
<Tooltip
content={t("Passkeys are not supported in the desktop app")}
>
{button}
</Tooltip>
) : (
button
)}
</Form>
</Wrapper>
);
@@ -898,6 +898,7 @@
"Mention users and more": "Mention users and more",
"Insert block": "Insert block",
"Continue with Passkey": "Continue with Passkey",
"Passkeys are not supported in the desktop app": "Passkeys are not supported in the desktop app",
"Sign In": "Sign In",
"Continue with Email": "Continue with Email",
"Continue with {{ authProviderName }}": "Continue with {{ authProviderName }}",