Skip to content

Commit b7c7b7b

Browse files
committed
Use null factor
1 parent 9434e55 commit b7c7b7b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/react/src/components/form/flow/org-switching-flow.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { NULL_FACTOR } from "../../../domain/handles";
12
import { Cancel, LogIn, MFA, Recover } from "../../../domain/types";
23
import {
34
CreateFlowOptions,
@@ -44,7 +45,7 @@ export function createFlow(opts: CreateFlowOptions) {
4445
const setRecoveryCodes = (codes: string[]) => {
4546
recoveryCodes = codes;
4647
};
47-
48+
4849
// notify subscribers every time the state changes
4950
function setState(newState: FlowState, changeEvent: Event) {
5051
state = newState;
@@ -59,9 +60,7 @@ export function createFlow(opts: CreateFlowOptions) {
5960
send,
6061
{
6162
config: {
62-
factor: {
63-
method: "email_link",
64-
},
63+
factor: NULL_FACTOR, // will be replaced by authn context update
6564
handle: opts.lastUserHandle,
6665
},
6766
attempt: 0,

packages/react/src/domain/handles.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,7 @@ export function parsePhoneNumber(
200200
}
201201
}
202202
}
203+
204+
export const NULL_FACTOR: Factor = {
205+
method: "email_link",
206+
};

0 commit comments

Comments
 (0)