Skip to content

Commit c61ad3e

Browse files
committed
chore: update signin to sign-in and add additional references
1 parent ee45f7c commit c61ad3e

File tree

1 file changed

+39
-37
lines changed
  • src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in

1 file changed

+39
-37
lines changed

src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in/index.mdx

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if (nextStep.signInStep === 'DONE') {
116116
}
117117
```
118118

119-
## Confirm signin with SMS MFA
119+
## Confirm sign-in with SMS MFA
120120

121121
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.
122122

@@ -154,7 +154,7 @@ async function confirmMfaCode(mfaCode: string) {
154154

155155
```
156156

157-
## Confirm signin with TOTP MFA
157+
## Confirm sign-in with TOTP MFA
158158

159159
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.
160160

@@ -184,7 +184,7 @@ async function confirmTotpCode(totpCode: string) {
184184

185185
```
186186

187-
## Confirm signin with Email MFA
187+
## Confirm sign-in with Email MFA
188188

189189
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.
190190

@@ -223,7 +223,7 @@ async function confirmMfaCode(mfaCode: string) {
223223
```
224224

225225

226-
## Continue signin with MFA Selection
226+
## Continue sign-in with MFA Selection
227227

228228
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.
229229

@@ -265,7 +265,7 @@ async function handleMfaSelection(mfaType: MfaType) {
265265

266266
```
267267

268-
## Continue signin with Email Setup
268+
## Continue sign-in with Email Setup
269269

270270
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.
271271

@@ -290,7 +290,7 @@ async function confirmEmail(email: string) {
290290

291291
```
292292

293-
## Continue signin with TOTP Setup
293+
## Continue sign-in with TOTP Setup
294294

295295
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.
296296

@@ -322,7 +322,7 @@ async function confirmTotpCode(totpCode: string) {
322322

323323
```
324324

325-
## Continue signin with MFA Setup Selection
325+
## Continue sign-in with MFA Setup Selection
326326

327327
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.
328328

@@ -361,7 +361,7 @@ async function handleMfaSelection(mfaType: MfaType) {
361361

362362
```
363363

364-
## Confirm signin with custom challenge
364+
## Confirm sign-in with custom challenge
365365

366366
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.
367367

@@ -402,12 +402,14 @@ If `failAuthentication=true` is returned by the Lambda, Cognito will invalidate
402402

403403
</Callout>
404404

405-
## Confirm signin with new password
405+
## Confirm sign-in with new password
406406

407407
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.
408408

409409
Prompt the user for a new password and pass it to the `confirmSignIn` API.
410410

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.
412+
411413
```ts
412414
import { type SignInOutput, confirmSignIn } from '@aws-amplify/auth';
413415

@@ -482,7 +484,7 @@ async function handleResetPasswordResult(
482484
If the next step is `CONFIRM_SIGN_UP`, Amplify Auth requires that the user confirm their email or phone number before proceeding.
483485
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.
484486

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.
486488

487489
<Callout>
488490

@@ -612,7 +614,7 @@ Future<void> _handleSignInResult(SignInResult result) async {
612614
}
613615
}
614616
```
615-
## Confirm signin with SMS MFA
617+
## Confirm sign-in with SMS MFA
616618

617619
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.
618620

@@ -654,7 +656,7 @@ Future<void> confirmMfaUser(String mfaCode) async {
654656
}
655657
```
656658

657-
## Confirm signin with TOTP MFA
659+
## Confirm sign-in with TOTP MFA
658660

659661
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.
660662

@@ -685,7 +687,7 @@ Future<void> confirmTotpUser(String totpCode) async {
685687
}
686688
```
687689

688-
## Confirm signin with Email MFA
690+
## Confirm sign-in with Email MFA
689691

690692
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.
691693

@@ -728,7 +730,7 @@ Future<void> confirmMfaUser(String mfaCode) async {
728730
```
729731

730732

731-
## Continue signin with MFA Selection
733+
## Continue sign-in with MFA Selection
732734

733735
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.
734736

@@ -766,7 +768,7 @@ Future<void> _handleMfaSelection(MfaType selection) async {
766768
}
767769
```
768770

769-
## Continue signin with Email Setup
771+
## Continue sign-in with Email Setup
770772

771773
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.
772774

@@ -794,7 +796,7 @@ Future<void> confirmEmailUser(String emailAddress) async {
794796
}
795797
```
796798

797-
## Continue signin with TOTP Setup
799+
## Continue sign-in with TOTP Setup
798800

799801
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.
800802

@@ -827,7 +829,7 @@ Future<void> confirmTotpUser(String totpCode) async {
827829
}
828830
```
829831

830-
## Continue signin with MFA Setup Selection
832+
## Continue sign-in with MFA Setup Selection
831833
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.
832834

833835
The MFA types which are currently supported by Amplify Auth are:
@@ -864,7 +866,7 @@ Future<void> _handleMfaSelection(MfaType selection) async {
864866
}
865867
```
866868

867-
## Confirm signin with custom challenge
869+
## Confirm sign-in with custom challenge
868870

869871
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).
870872

@@ -906,7 +908,7 @@ If `failAuthentication=true` is returned by the Lambda, Cognito will invalidate
906908

907909
</Callout>
908910

909-
## Confirm signin with new password
911+
## Confirm sign-in with new password
910912
If the next step is `confirmSignInWithNewPassword`, Amplify Auth requires the user choose a new password they proceeding with the sign in.
911913

912914
Prompt the user for a new password and pass it to the `confirmSignIn` API.
@@ -1459,7 +1461,7 @@ RxAmplify.Auth.signIn("username", "password", options).subscribe(
14591461

14601462
</BlockSwitcher>
14611463

1462-
## Confirm signin with SMS MFA
1464+
## Confirm sign-in with SMS MFA
14631465

14641466
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.
14651467

@@ -1559,38 +1561,38 @@ RxAmplify.Auth.confirmSignIn(
15591561

15601562
</BlockSwitcher>
15611563

1562-
## Confirm signin with TOTP MFA
1564+
## Confirm sign-in with TOTP MFA
15631565

15641566
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.
15651567

15661568
After the user enters the code, your implementation must pass the value to Amplify Auth `confirmSignIn` API.
15671569

15681570

1569-
## Confirm signin with Email MFA
1571+
## Confirm sign-in with Email MFA
15701572

15711573
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.
15721574

15731575
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.
15741576

1575-
## Continue signin with MFA Selection
1577+
## Continue sign-in with MFA Selection
15761578

15771579
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.
15781580

1579-
## Continue signin with Email Setup
1581+
## Continue sign-in with Email Setup
15801582

15811583
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.
15821584

1583-
## Continue signin with TOTP Setup
1585+
## Continue sign-in with TOTP Setup
15841586

15851587
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.
15861588

15871589
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.
15881590

1589-
## Continue signin with MFA Setup Selection
1591+
## Continue sign-in with MFA Setup Selection
15901592

15911593
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.
15921594

1593-
## Confirm signin with custom challenge
1595+
## Confirm sign-in with custom challenge
15941596

15951597
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.
15961598

@@ -1704,7 +1706,7 @@ NotAuthorizedException{message=Failed since user is not authorized., cause=NotAu
17041706

17051707
</Callout>
17061708

1707-
## Confirm signin with new password
1709+
## Confirm sign-in with new password
17081710
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.
17091711

17101712
<BlockSwitcher>
@@ -2100,7 +2102,7 @@ func signIn(username: String, password: String) async {
21002102
21012103
The `nextStep` property is of enum type `AuthSignInStep`. Depending on its value, your code should take one of the following actions:
21022104
2103-
## Confirm signin with SMS MFA
2105+
## Confirm sign-in with SMS MFA
21042106
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 Amplify Auth `confirmSignIn` API.
21052107

21062108
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.
@@ -2161,7 +2163,7 @@ func confirmSignIn(confirmationCodeFromUser: String) -> AnyCancellable {
21612163

21622164
</BlockSwitcher>
21632165

2164-
## Confirm signin with TOTP MFA
2166+
## Confirm sign-in with TOTP MFA
21652167

21662168
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.
21672169

@@ -2222,7 +2224,7 @@ func confirmSignIn(totpCode: String) -> AnyCancellable {
22222224
</BlockSwitcher>
22232225

22242226

2225-
## Confirm signin with Email MFA
2227+
## Confirm sign-in with Email MFA
22262228
If the next step is `confirmSignInWithOTP`, Amplify Auth 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 Amplify Auth `confirmSignIn` API.
22272229

22282230
<Callout info>
@@ -2288,7 +2290,7 @@ func confirmSignIn(confirmationCodeFromUser: String) -> AnyCancellable {
22882290
</BlockSwitcher>
22892291

22902292

2291-
## Continue signin with MFA Selection
2293+
## Continue sign-in with MFA Selection
22922294

22932295
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.
22942296

@@ -2338,7 +2340,7 @@ func confirmSignInWithTOTPAsMFASelection() -> AnyCancellable {
23382340

23392341
</BlockSwitcher>
23402342

2341-
## Continue signin with Email Setup
2343+
## Continue sign-in with Email Setup
23422344
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.
23432345

23442346
```swift
@@ -2350,7 +2352,7 @@ case .continueSignInWithEmailMFASetup:
23502352
// Then invoke `confirmSignIn` api with the email address
23512353
```
23522354

2353-
## Continue signin with TOTP Setup
2355+
## Continue sign-in with TOTP Setup
23542356

23552357
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.
23562358
@@ -2423,7 +2425,7 @@ func confirmSignInWithTOTPSetup(totpCodeFromAuthenticatorApp: String) -> AnyCanc
24232425
24242426
</BlockSwitcher>
24252427
2426-
## Continue signin with MFA Setup Selection
2428+
## Continue sign-in with MFA Setup Selection
24272429
24282430
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.
24292431
@@ -2473,7 +2475,7 @@ func continueSignInWithEmailMFASetupSelection() -> AnyCancellable {
24732475
24742476
</BlockSwitcher>
24752477
2476-
## Confirm signin with custom challenge
2478+
## Confirm sign-in with custom challenge
24772479
24782480
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.
24792481
@@ -2544,7 +2546,7 @@ Exception: notAuthorized{message=Failed since user is not authorized., cause=No
25442546
25452547
</Callout>
25462548
2547-
## Confirm signin with new password
2549+
## Confirm sign-in with new password
25482550
25492551
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.
25502552

0 commit comments

Comments
 (0)