You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/custom-flows/email-password-mfa.mdx
+44-24Lines changed: 44 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ This guide will walk you through how to build a custom email/password sign-in fl
28
28
29
29
1. In the Clerk Dashboard, navigate to the [**Multi-factor**](https://dashboard.clerk.com/last-active?path=user-authentication/multi-factor) page.
30
30
1. For the purpose of this guide, toggle on both the **Authenticator application** and **Backup codes** strategies.
31
+
1. Select **Save**.
31
32
32
33
### Sign-in flow
33
34
@@ -309,19 +310,34 @@ This guide will walk you through how to build a custom email/password sign-in fl
309
310
310
311
### Build the flow
311
312
312
-
Create a component that handles the sign-in with multi-factor authentication flow.
313
+
1. Create the `(auth)` route group. This groups your sign-up and sign-in pages.
314
+
1. In the `(auth)` group, create a `_layout.tsx` file with the following code. The [`useAuth()`](/docs/references/react/use-auth) hook is used to access the user's authentication state. If the user's already signed in, they'll be redirected to the home page.
313
315
314
-
> [!NOTE]
315
-
> You can render this component in a custom sign-in or sign-up flow, which you can find examples of in [the Expo quickstart](/docs/quickstarts/expo).
In the `(auth)` group, create a `sign-in.tsx` file with the following code. The [`useSignIn()`](/docs/references/react/use-sign-in) hook is used to create a sign-in flow. The user can sign in using their email and password and will be prompted to verify their account with a code from their authenticator app or with a backup code.
0 commit comments