Skip to content

Commit 22e9a9f

Browse files
committed
docs(auth): mention TOTP official docs in MFA usage page
1 parent 2bee8c8 commit 22e9a9f

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

docs/auth/multi-factor-auth.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,22 @@ next: /firestore/usage
55
previous: /auth/oidc-auth
66
---
77

8-
# iOS Setup
8+
> Before a user can enroll a second factor they need to verify their email. See
9+
> [`User`](/reference/auth/user#sendEmailVerification) interface is returned.
10+
11+
# TOTP MFA
12+
13+
The [https://firebase.google.com/docs/auth/web/totp-mfa](official guide for the Firebase web TOTP authentication) explains the process well, including project prerequisites to enable the feature, as well as code examples.
14+
15+
# Phone MFA
16+
17+
## iOS Setup
918

1019
Make sure to follow [the official Identity Platform
1120
documentation](https://cloud.google.com/identity-platform/docs/ios/mfa#enabling_multi-factor_authentication)
1221
to enable multi-factor authentication for your project and verify your app.
1322

14-
# Enroll a new factor
15-
16-
> Before a user can enroll a second factor they need to verify their email. See
17-
> [`User`](/reference/auth/user#sendEmailVerification) interface is returned.
23+
## Enroll a new factor
1824

1925
Begin by obtaining a [`MultiFactorUser`](/reference/auth/multifactoruser)
2026
instance for the current user. This is the entry point for most multi-factor
@@ -57,7 +63,7 @@ await multiFactorUser.enroll(multiFactorAssertion, 'Optional display name for th
5763
You can inspect [`User#multiFactor`](/reference/auth/user#multiFactor) for
5864
information about the user's enrolled factors.
5965

60-
# Sign-in flow using multi-factor
66+
## Sign-in flow using phone multi-factor
6167

6268
Ensure the account has already enrolled a second factor. Begin by calling the
6369
default sign-in methods, for example email and password. If the account requires
@@ -103,7 +109,6 @@ if (resolver.hints.length > 1) {
103109
// Use resolver.hints to display a list of second factors to the user
104110
}
105111

106-
// Currently only phone based factors are supported
107112
if (resolver.hints[0].factorId === PhoneMultiFactorGenerator.FACTOR_ID) {
108113
// Continue with the sign-in flow
109114
}
@@ -163,7 +168,6 @@ signInWithEmailAndPassword(getAuth(), email, password)
163168
// Use resolver.hints to display a list of second factors to the user
164169
}
165170

166-
// Currently only phone based factors are supported
167171
if (resolver.hints[0].factorId === PhoneMultiFactorGenerator.FACTOR_ID) {
168172
const hint = resolver.hints[0];
169173

@@ -185,7 +189,7 @@ signInWithEmailAndPassword(getAuth(), email, password)
185189
});
186190
```
187191

188-
# Testing
192+
## Testing
189193

190194
You can define test phone numbers and corresponding verification codes. The
191195
official[official

0 commit comments

Comments
 (0)