From a24fc14eac8cd962551c59294273f4c2fd0c0f81 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 8 Feb 2024 11:44:25 +0100 Subject: [PATCH] feat: prep work for passkeys and deduplicated registration nodes (#179) --- src/react-components/ory/helpers/utils.ts | 1 + src/react-components/ory/index.ts | 2 +- .../ory/sections/auth-code-section.tsx | 20 +++--- .../ory/sections/passkey-settings-section.tsx | 13 ++-- .../ory/sections/passwordless-section.tsx | 54 ++++++++++---- ...ttings-section.tsx => profile-section.tsx} | 26 +++++++ .../ory/sections/registration-section.tsx | 3 +- .../sections/webauthn-settings-section.tsx | 4 +- src/react-components/ory/user-auth-card.tsx | 70 +++++++++++++++++-- .../ory/user-settings-card.tsx | 2 +- 10 files changed, 154 insertions(+), 41 deletions(-) rename src/react-components/ory/sections/{profile-settings-section.tsx => profile-section.tsx} (51%) diff --git a/src/react-components/ory/helpers/utils.ts b/src/react-components/ory/helpers/utils.ts index 1464d9aae..65a91e6d6 100644 --- a/src/react-components/ory/helpers/utils.ts +++ b/src/react-components/ory/helpers/utils.ts @@ -8,6 +8,7 @@ export const hasGroup = (group: string) => (nodes: UiNode[]) => export const hasOidc = hasGroup("oidc") export const hasPassword = hasGroup("password") +export const hasProfile = hasGroup("profile") export const hasWebauthn = hasGroup("webauthn") export const hasPasskey = hasGroup("passkey") export const hasLookupSecret = hasGroup("lookup_secret") diff --git a/src/react-components/ory/index.ts b/src/react-components/ory/index.ts index 360726401..0f142f38a 100644 --- a/src/react-components/ory/index.ts +++ b/src/react-components/ory/index.ts @@ -16,7 +16,7 @@ export * from "./sections/oidc-section" export * from "./sections/oidc-settings-section" export * from "./sections/password-settings-section" export * from "./sections/passwordless-section" -export * from "./sections/profile-settings-section" +export * from "./sections/profile-section" export * from "./sections/registration-section" export * from "./sections/totp-settings-section" export * from "./sections/webauthn-settings-section" diff --git a/src/react-components/ory/sections/auth-code-section.tsx b/src/react-components/ory/sections/auth-code-section.tsx index 22c0c80a9..d7f62625f 100644 --- a/src/react-components/ory/sections/auth-code-section.tsx +++ b/src/react-components/ory/sections/auth-code-section.tsx @@ -32,17 +32,15 @@ export const AuthCodeSection = ({ }} />
-
- {/* default group is used here automatically for login */} -
+ {/* default group is used here automatically for login */} +