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: src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in/index.mdx
+39-37Lines changed: 39 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ if (nextStep.signInStep === 'DONE') {
116
116
}
117
117
```
118
118
119
-
## Confirm signin with SMS MFA
119
+
## Confirm sign-in with SMS MFA
120
120
121
121
If the next step is `CONFIRM_SIGN_IN_WITH_SMS_CODE`, Amplify Auth has sent the user a random code over SMS and is waiting for the user to verify that code. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, pass the value to the `confirmSignIn` API.
122
122
@@ -154,7 +154,7 @@ async function confirmMfaCode(mfaCode: string) {
154
154
155
155
```
156
156
157
-
## Confirm signin with TOTP MFA
157
+
## Confirm sign-in with TOTP MFA
158
158
159
159
If the next step is `CONFIRM_SIGN_IN_WITH_TOTP_CODE`, you should prompt the user to enter the TOTP code from their associated authenticator app during set up. The code is a six-digit number that changes every 30 seconds. The user must enter the code before the 30-second window expires.
160
160
@@ -184,7 +184,7 @@ async function confirmTotpCode(totpCode: string) {
184
184
185
185
```
186
186
187
-
## Confirm signin with Email MFA
187
+
## Confirm sign-in with Email MFA
188
188
189
189
If the next step is `CONFIRM_SIGN_IN_WITH_EMAIL_CODE`, Amplify Auth has sent the user a random code to their email address and is waiting for the user to verify that code. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, pass the value to the `confirmSignIn` API.
190
190
@@ -223,7 +223,7 @@ async function confirmMfaCode(mfaCode: string) {
223
223
```
224
224
225
225
226
-
## Continue signin with MFA Selection
226
+
## Continue sign-in with MFA Selection
227
227
228
228
If the next step is `CONTINUE_SIGN_IN_WITH_MFA_SELECTION`, the user must select the MFA method to use. Amplify Auth currently supports SMS, TOTP, and EMAIL as MFA methods. After the user selects an MFA method, your implementation must pass the selected MFA method to Amplify Auth using `confirmSignIn` API.
229
229
@@ -265,7 +265,7 @@ async function handleMfaSelection(mfaType: MfaType) {
265
265
266
266
```
267
267
268
-
## Continue signin with Email Setup
268
+
## Continue sign-in with Email Setup
269
269
270
270
If the next step is `CONTINUE_SIGN_IN_WITH_EMAIL_SETUP`, then the user must provide an email address to complete the sign in process. Once this value has been collected from the user, call the `confirmSignIn` API to continue.
271
271
@@ -290,7 +290,7 @@ async function confirmEmail(email: string) {
290
290
291
291
```
292
292
293
-
## Continue signin with TOTP Setup
293
+
## Continue sign-in with TOTP Setup
294
294
295
295
The `CONTINUE_SIGN_IN_WITH_TOTP_SETUP` step signifies that the user must set up TOTP before they can sign in. The step returns an associated value of type TOTPSetupDetails which must be used to configure an authenticator app like Microsoft Authenticator or Google Authenticator. TOTPSetupDetails provides a helper method called getSetupURI which generates a URI that can be used, for example, in a button to open the user's installed authenticator app. For more advanced use cases, TOTPSetupDetails also contains a sharedSecret which can be used to either generate a QR code or be manually entered into an authenticator app.
296
296
@@ -322,7 +322,7 @@ async function confirmTotpCode(totpCode: string) {
322
322
323
323
```
324
324
325
-
## Continue signin with MFA Setup Selection
325
+
## Continue sign-in with MFA Setup Selection
326
326
327
327
If the next step is `CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION`, then the user must indicate which of the available MFA methods they would like to setup. After the user selects an MFA method to setup, your implementation must pass the selected MFA method to the `confirmSignIn` API.
328
328
@@ -361,7 +361,7 @@ async function handleMfaSelection(mfaType: MfaType) {
361
361
362
362
```
363
363
364
-
## Confirm signin with custom challenge
364
+
## Confirm sign-in with custom challenge
365
365
366
366
If the next step is `CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE`, Amplify Auth is awaiting completion of a custom authentication challenge. The challenge is based on the AWS Lambda trigger you configured as part of a custom sign in flow.
367
367
@@ -402,12 +402,14 @@ If `failAuthentication=true` is returned by the Lambda, Cognito will invalidate
402
402
403
403
</Callout>
404
404
405
-
## Confirm signin with new password
405
+
## Confirm sign-in with new password
406
406
407
407
If the next step is `CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED`, Amplify Auth requires the user choose a new password they proceeding with the sign in.
408
408
409
409
Prompt the user for a new password and pass it to the `confirmSignIn` API.
410
410
411
+
See the [sign-in](/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/) and [manage-password](/[platform]/build-a-backend/auth/manage-users/manage-passwords/) docs for more information.
@@ -482,7 +484,7 @@ async function handleResetPasswordResult(
482
484
If the next step is `CONFIRM_SIGN_UP`, Amplify Auth requires that the user confirm their email or phone number before proceeding.
483
485
Use the `resendSignUpCode` API to send a new sign up code to the registered email or phone number, followed by `confirmSignUp` to complete the sign up.
484
486
485
-
See the [confirm sign up](/[platform]/build-a-backend/auth/connect-your-frontend/sign-up/#confirm-sign-up) docs for more information.
487
+
See the [sign up](/[platform]/build-a-backend/auth/connect-your-frontend/sign-up/) docs for more information.
If the next step is `confirmSignInWithSmsMfaCode`, Amplify Auth has sent the user a random code over SMS and is waiting for the user to verify that code. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, pass the value to the `confirmSignIn` API.
If the next step is `confirmSignInWithTOTPCode`, you should prompt the user to enter the TOTP code from their associated authenticator app during set up. The code is a six-digit number that changes every 30 seconds. The user must enter the code before the 30-second window expires.
If the next step is `confirmSignInWithOtpCode`, Amplify Auth has sent the user a random code to their email address and is waiting for the user to verify that code. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, pass the value to the `confirmSignIn` API.
If the next step is `continueSignInWithMFASelection`, the user must select the MFA method to use. Amplify Auth currently supports SMS, TOTP, and email as MFA methods. After the user selects an MFA method, your implementation must pass the selected MFA method to Amplify Auth using `confirmSignIn` API.
If the next step is `continueSignInWithEmailMfaSetup`, then the user must provide an email address to complete the sign in process. Once this value has been collected from the user, call the `confirmSignIn` API to continue.
If the next step is `continueSignInWithTOTPSetup`, then the user must provide a TOTP code to complete the sign in process. The step returns an associated value of type `TOTPSetupDetails` which would be used for generating TOTP. `TOTPSetupDetails` provides a helper method called `getSetupURI` that can be used to generate a URI, which can be used by native password managers for TOTP association. For example. if the URI is used on Apple platforms, it will trigger the platform's native password manager to associate TOTP with the account. For more advanced use cases, `TOTPSetupDetails` also contains the `sharedSecret` that will be used to either generate a QR code or can be manually entered into an authenticator app.
If the next step is `continueSignInWithMfaSetupSelection`, then the user must indicate which of the available MFA methods they would like to setup. After the user selects an MFA method to setup, your implementation must pass the selected MFA method to the `confirmSignIn` API.
832
834
833
835
The MFA types which are currently supported by Amplify Auth are:
If the next step is `confirmSignInWithCustomChallenge`, Amplify Auth is awaiting completion of a custom authentication challenge. The challenge is based on the AWS Lambda trigger you configured as part of a [custom sign in flow](/[platform]/build-a-backend/auth/customize-auth-lifecycle/custom-auth-flows/#sign-in-a-user).
870
872
@@ -906,7 +908,7 @@ If `failAuthentication=true` is returned by the Lambda, Cognito will invalidate
906
908
907
909
</Callout>
908
910
909
-
## Confirm signin with new password
911
+
## Confirm sign-in with new password
910
912
If the next step is `confirmSignInWithNewPassword`, Amplify Auth requires the user choose a new password they proceeding with the sign in.
911
913
912
914
Prompt the user for a new password and pass it to the `confirmSignIn` API.
If the next step is `CONFIRM_SIGN_IN_WITH_SMS_MFA_CODE`, Amplify Auth has sent the user a random code over SMS, and is waiting to find out if the user successfully received it. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, your implementation must pass the value to Amplify Auth `confirmSignIn` API.
If the next step is `CONFIRM_SIGN_IN_WITH_TOTP_CODE`, you should prompt the user to enter the TOTP code from their associated authenticator app during set up. The code is a six-digit number that changes every 30 seconds. The user must enter the code before the 30-second window expires.
1565
1567
1566
1568
After the user enters the code, your implementation must pass the value to Amplify Auth `confirmSignIn` API.
1567
1569
1568
1570
1569
-
## Confirm signin with Email MFA
1571
+
## Confirm sign-in with Email MFA
1570
1572
1571
1573
If the next step is `CONFIRM_SIGN_IN_WITH_EMAIL_MFA_CODE`, Amplify Auth has sent the user a random code to their email address and is waiting to find out if the user successfully received it. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, your implementation must pass the value to Amplify Auth `confirmSignIn` API.
1572
1574
1573
1575
Note: the signIn result also includes an `AuthCodeDeliveryDetails` member. It includes additional information about the code delivery such as the partial email address of the recipient.
1574
1576
1575
-
## Continue signin with MFA Selection
1577
+
## Continue sign-in with MFA Selection
1576
1578
1577
1579
If the next step is `CONTINUE_SIGN_IN_WITH_MFA_SELECTION`, the user must select the MFA method to use. Amplify Auth currently supports SMS, TOTP, and email as MFA methods. After the user selects an MFA method, your implementation must pass the selected MFA method to Amplify Auth using `confirmSignIn` API.
1578
1580
1579
-
## Continue signin with Email Setup
1581
+
## Continue sign-in with Email Setup
1580
1582
1581
1583
If the next step is `CONTINUE_SIGN_IN_WITH_EMAIL_MFA_SETUP`, then the user must provide an email address to complete the sign in process. Once this value has been collected from the user, call the `confirmSignIn` API to continue.
1582
1584
1583
-
## Continue signin with TOTP Setup
1585
+
## Continue sign-in with TOTP Setup
1584
1586
1585
1587
If the next step is `CONTINUE_SIGN_IN_WITH_TOTP_SETUP`, then the user must provide a TOTP code to complete the sign in process. The step returns an associated value of type `TOTPSetupDetails` which would be used for generating TOTP. `TOTPSetupDetails` provides a helper method called `getSetupURI` that can be used to generate a URI, which can be used by native password managers for TOTP association. For example. if the URI is used on Apple platforms, it will trigger the platform's native password manager to associate TOTP with the account. For more advanced use cases, `TOTPSetupDetails` also contains the `sharedSecret` that will be used to either generate a QR code or can be manually entered into an authenticator app.
1586
1588
1587
1589
Once the authenticator app is set up, the user can generate a TOTP code and provide it to the library to complete the sign in process.
1588
1590
1589
-
## Continue signin with MFA Setup Selection
1591
+
## Continue sign-in with MFA Setup Selection
1590
1592
1591
1593
If the next step is `CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION`, the user must select the MFA method to setup. Amplify Auth currently supports SMS, TOTP, and email as MFA methods. After the user selects an MFA method, your implementation must pass the selected MFA method to Amplify Auth using `confirmSignIn` API.
1592
1594
1593
-
## Confirm signin with custom challenge
1595
+
## Confirm sign-in with custom challenge
1594
1596
1595
1597
If the next step is `CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE`, Amplify Auth is awaiting completion of a custom authentication challenge. The challenge is based on the Lambda trigger you setup when you configured a [custom sign in flow](/[platform]/build-a-backend/auth/customize-auth-lifecycle/custom-auth-flows/#sign-in-a-user). To complete this step, you should prompt the user for the custom challenge answer, and pass the answer to the `confirmSignIn` API.
1596
1598
@@ -1704,7 +1706,7 @@ NotAuthorizedException{message=Failed since user is not authorized., cause=NotAu
1704
1706
1705
1707
</Callout>
1706
1708
1707
-
## Confirm signin with new password
1709
+
## Confirm sign-in with new password
1708
1710
If you receive a `UserNotConfirmedException` while signing in, Amplify Auth requires a new password for the user before they can proceed. Prompt the user for a new password and pass it to the `confirmSignIn` API.
The `nextStep` property is of enum type `AuthSignInStep`. Depending on its value, your code should take one of the following actions:
2102
2104
2103
-
## Confirm signin with SMS MFA
2105
+
## Confirm sign-in with SMS MFA
2104
2106
If the next step is `confirmSignInWithSMSMFACode`, Amplify Auth has sent the user a random code over SMS, and is waiting to find out if the user successfully received it. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, your implementation must pass the value to AmplifyAuth `confirmSignIn` API.
2105
2107
2106
2108
Note: the signin result also includes an `AuthCodeDeliveryDetails` member. It includes additional information about the code delivery such as the partial phone number of the SMS recipient.
If the next step is `confirmSignInWithTOTPCode`, you should prompt the user to enter the TOTP code from their associated authenticator app during set up. The code is a six-digit number that changes every 30 seconds. The user must enter the code before the 30-second window expires.
If the next step is `confirmSignInWithOTP`, AmplifyAuth has sent a random code to the user's email address, and is waiting to find out if the user successfully received it. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, your implementation must pass the value to AmplifyAuth `confirmSignIn` API.
If the next step is `continueSignInWithMFASelection`, the user must select the MFA method to use. AmplifyAuth currently supports SMS, TOTP, and email as MFA methods. After the user selects an MFA method, your implementation must pass the selected MFA method to AmplifyAuth using `confirmSignIn` API.
If the next step is `continueSignInWithEmailMFASetup`, then the user must provide an email address to complete the sign in process. Oncethis value has been collected from the user, call the `confirmSignIn` API to continue.
2343
2345
2344
2346
```swift
@@ -2350,7 +2352,7 @@ case .continueSignInWithEmailMFASetup:
2350
2352
// Then invoke `confirmSignIn` api with the email address
2351
2353
```
2352
2354
2353
-
## Continuesignin with TOTPSetup
2355
+
## Continuesign-in with TOTPSetup
2354
2356
2355
2357
If the next step is `continueSignInWithTOTPSetup`, then the user must provide a TOTP code to complete the sign in process. The step returns an associated value of type `TOTPSetupDetails` which would be used for generating TOTP. `TOTPSetupDetails` provides a helper method called `getSetupURI` that can be used to generate a URI, which can be used by native password managers forTOTP association. For example. if the URI is used on Apple platforms, it will trigger the platform's native password manager to associate TOTP with the account. For more advanced use cases, `TOTPSetupDetails` also contains the `sharedSecret` that will be used to either generate a QR code or can be manually entered into an authenticator app.
If the next step is `continueSignInWithMFASetupSelection`, the user must indicate which of the available MFA methods they would like to setup. After the user selects an MFA method to setup, your implementation must pass the selected MFA method to the `confirmSignIn` API.
If the next step is `confirmSignInWithCustomChallenge`, Amplify Auth is awaiting completion of a custom authentication challenge. The challenge is based on the Lambda trigger you setup when you configured a [custom sign in flow](/[platform]/build-a-backend/auth/customize-auth-lifecycle/custom-auth-flows/#sign-in-a-user). To complete this step, you should prompt the user for the custom challenge answer, and pass the answer to the `confirmSignIn` API.
2479
2481
@@ -2544,7 +2546,7 @@ Exception: notAuthorized{message=Failed since user is not authorized., cause=No
2544
2546
2545
2547
</Callout>
2546
2548
2547
-
## Confirm signin with new password
2549
+
## Confirm sign-in with new password
2548
2550
2549
2551
If the next step is `confirmSignInWithNewPassword`, Amplify Auth requires a new password for the user before they can proceed. Prompt the user for a new password and pass it to the `confirmSignIn` API.
0 commit comments