diff --git a/src/components/ory/ui/Flow.tsx b/src/components/ory/ui/Flow.tsx index 3c34712efa..4fb8cafbf0 100644 --- a/src/components/ory/ui/Flow.tsx +++ b/src/components/ory/ui/Flow.tsx @@ -11,7 +11,11 @@ import { UpdateVerificationFlowBody as SubmitSelfServiceVerificationFlowBody, UiNode } from "@ory/client"; -import { getNodeId, isUiNodeInputAttributes } from "@ory/integrations/ui"; +import { + filterNodesByGroups, + getNodeId, + isUiNodeInputAttributes +} from "@ory/integrations/ui"; import { Component, FormEvent } from "react"; import FormSkeletonLoader from "../../SkeletonLoader/FormSkeletonLoader"; @@ -158,40 +162,82 @@ export class Flow extends Component, State> { } return ( -
- {!hideGlobalMessages ? : null} - {nodes.map((node, k) => { - const id = getNodeId(node) as keyof Values; - return ( - - new Promise((resolve) => { - this.setState( - (state) => ({ - ...state, - values: { - ...state.values, - [getNodeId(node)]: value - } - }), - resolve - ); - }) - } - /> - ); - })} - +
+
+ {!hideGlobalMessages ? ( + + ) : null} + {filterNodesByGroups({ + nodes: nodes, + groups: ["default", "password"] + }).map((node, k) => { + const id = getNodeId(node) as keyof Values; + return ( + + new Promise((resolve) => { + this.setState( + (state) => ({ + ...state, + values: { + ...state.values, + [getNodeId(node)]: value + } + }), + resolve + ); + }) + } + /> + ); + })} + + +
+ +
+ {filterNodesByGroups({ + nodes: nodes, + groups: ["oidc", "webauthn"], + withoutDefaultGroup: true + }).map((node, k) => { + const id = getNodeId(node) as keyof Values; + return ( + + new Promise((resolve) => { + this.setState( + (state) => ({ + ...state, + values: { + ...state.values, + [getNodeId(node)]: value + } + }), + resolve + ); + }) + } + /> + ); + })} +
+
); } } diff --git a/src/components/ory/ui/NodeInputButton.tsx b/src/components/ory/ui/NodeInputButton.tsx index a91d00ee19..e298363193 100644 --- a/src/components/ory/ui/NodeInputButton.tsx +++ b/src/components/ory/ui/NodeInputButton.tsx @@ -36,6 +36,7 @@ export function NodeInputButton({ }} value={attributes.value || ""} disabled={attributes.disabled || disabled} + type="button" > {getNodeLabel(node)} diff --git a/src/components/ory/ui/NodeInputSubmit.tsx b/src/components/ory/ui/NodeInputSubmit.tsx index 4061f8f630..166a923f3c 100644 --- a/src/components/ory/ui/NodeInputSubmit.tsx +++ b/src/components/ory/ui/NodeInputSubmit.tsx @@ -19,6 +19,7 @@ export function NodeInputSubmit({ }} value={attributes.value || ""} disabled={attributes.disabled || disabled} + type="submit" > {getNodeLabel(node)}