Skip to content

Commit 6f26a46

Browse files
committed
Replace usages of username with email
1 parent d77e718 commit 6f26a46

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ The `nextStep` property is of enum type `AuthSignInStep`. Depending on its value
10681068
```java
10691069
try {
10701070
Amplify.Auth.signIn(
1071-
"username",
1071+
10721072
"password",
10731073
result ->
10741074
{
@@ -1184,7 +1184,7 @@ try {
11841184
```kotlin
11851185
try {
11861186
Amplify.Auth.signIn(
1187-
"username",
1187+
11881188
"password",
11891189
{ result ->
11901190
val nextStep = result.nextStep
@@ -1291,7 +1291,7 @@ try {
12911291
```kotlin
12921292
try {
12931293
val result = Amplify.Auth.signIn(
1294-
"username",
1294+
12951295
"password"
12961296
)
12971297
val nextStep = result.nextStep
@@ -1391,7 +1391,7 @@ try {
13911391
<Block name="RxJava">
13921392

13931393
```java
1394-
RxAmplify.Auth.signIn("username", "password").subscribe(
1394+
RxAmplify.Auth.signIn("[email protected]", "password").subscribe(
13951395
result ->
13961396
{
13971397
AuthNextSignInStep nextStep = result.getNextStep();

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,7 @@ AWSCognitoAuthSignInOptions options =
18601860
.callingActivity(callingActivity)
18611861
.build();
18621862
Amplify.Auth.signIn(
1863-
"username",
1863+
18641864
null,
18651865
options,
18661866
result -> {
@@ -1885,7 +1885,7 @@ val options = AWSCognitoAuthSignInOptions.builder()
18851885
.callingActivity(callingActivity)
18861886
.build()
18871887
Amplify.Auth.signIn(
1888-
"username",
1888+
18891889
null,
18901890
options,
18911891
{ result ->
@@ -1913,7 +1913,7 @@ try {
19131913
.callingActivity(callingActivity)
19141914
.build()
19151915
val result = Amplify.Auth.signIn(
1916-
username = "username",
1916+
username = "[email protected]",
19171917
password = null,
19181918
options = options
19191919
)
@@ -1939,7 +1939,7 @@ AWSCognitoAuthSignInOptions options =
19391939
.authFlowType(AuthFlowType.USER_AUTH)
19401940
.callingActivity(callingActivity)
19411941
.build();
1942-
RxAmplify.Auth.signIn("username", null, options)
1942+
RxAmplify.Auth.signIn("[email protected]", null, options)
19431943
.subscribe(
19441944
result -> {
19451945
if (result.getNextStep().getSignInStep() == AuthSignInStep.CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION) {

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ ArrayList<AuthUserAttribute> attributes = new ArrayList<>();
587587
attributes.add(new AuthUserAttribute(AuthUserAttributeKey.phoneNumber(), "+15551234567"));
588588

589589
Amplify.Auth.signUp(
590-
"username",
590+
591591
null,
592592
AuthSignUpOptions.builder().userAttributes(attributes).build(),
593593
result -> {
@@ -605,7 +605,7 @@ Amplify.Auth.signUp(
605605

606606
// Confirm sign up with the OTP received
607607
Amplify.Auth.confirmSignUp(
608-
"username",
608+
609609
"123456",
610610
result -> {
611611
if (result.isSignUpComplete()) {
@@ -631,7 +631,7 @@ val options =
631631
.build()
632632

633633
Amplify.Auth.signUp(
634-
"username",
634+
635635
null,
636636
options,
637637
{ result ->
@@ -649,7 +649,7 @@ Amplify.Auth.signUp(
649649

650650
// Confirm sign up with the OTP received
651651
Amplify.Auth.confirmSignUp(
652-
"username",
652+
653653
"123456",
654654
{ result ->
655655
if (result.nextStep.signUpStep == AuthSignUpStep.DONE) {
@@ -673,7 +673,7 @@ val options =
673673
.builder()
674674
.userAttributes(attributes)
675675
.build()
676-
var result = Amplify.Auth.signUp("username", null, options)
676+
var result = Amplify.Auth.signUp("[email protected]", null, options)
677677

678678
if (result.isSignUpComplete) {
679679
Log.i("AuthQuickstart", "Sign up is complete")
@@ -686,7 +686,7 @@ if (result.isSignUpComplete) {
686686

687687
// Confirm sign up with the OTP received
688688
result = Amplify.Auth.confirmSignUp(
689-
"username",
689+
690690
"123456"
691691
)
692692

@@ -704,7 +704,7 @@ ArrayList<AuthUserAttribute> attributes = new ArrayList<>();
704704
attributes.add(new AuthUserAttribute(AuthUserAttributeKey.phoneNumber(), "+15551234567"));
705705

706706
RxAmplify.Auth.signUp(
707-
"username",
707+
708708
null,
709709
AuthSignUpOptions.builder().userAttributes(attributes).build()
710710
)
@@ -724,7 +724,7 @@ RxAmplify.Auth.signUp(
724724

725725
// Confirm sign up with the OTP received
726726
RxAmplify.Auth.confirmSignUp(
727-
"username",
727+
728728
"123456"
729729
)
730730
.subscribe(
@@ -896,7 +896,7 @@ ArrayList<AuthUserAttribute> attributes = new ArrayList<>();
896896
attributes.add(new AuthUserAttribute(AuthUserAttributeKey.email(), "[email protected]"));
897897

898898
Amplify.Auth.signUp(
899-
"username",
899+
900900
null,
901901
AuthSignUpOptions.builder().userAttributes(attributes).build(),
902902
result -> {
@@ -914,7 +914,7 @@ Amplify.Auth.signUp(
914914

915915
// Confirm sign up with the OTP received
916916
Amplify.Auth.confirmSignUp(
917-
"username",
917+
918918
"123456",
919919
result -> {
920920
if (result.isSignUpComplete()) {
@@ -940,7 +940,7 @@ val options =
940940
.build()
941941

942942
Amplify.Auth.signUp(
943-
"username",
943+
944944
null,
945945
options,
946946
{ result ->
@@ -958,7 +958,7 @@ Amplify.Auth.signUp(
958958

959959
// Confirm sign up with the OTP received
960960
Amplify.Auth.confirmSignUp(
961-
"username",
961+
962962
"123456",
963963
{ result ->
964964
if (result.nextStep.signUpStep == AuthSignUpStep.DONE) {
@@ -982,7 +982,7 @@ val options =
982982
.builder()
983983
.userAttributes(attributes)
984984
.build()
985-
var result = Amplify.Auth.signUp("username", null, options)
985+
var result = Amplify.Auth.signUp("[email protected]", null, options)
986986

987987
if (result.isSignUpComplete) {
988988
Log.i("AuthQuickstart", "Sign up is complete")
@@ -995,7 +995,7 @@ if (result.isSignUpComplete) {
995995

996996
// Confirm sign up with the OTP received
997997
result = Amplify.Auth.confirmSignUp(
998-
"username",
998+
999999
"123456"
10001000
)
10011001

@@ -1013,7 +1013,7 @@ ArrayList<AuthUserAttribute> attributes = new ArrayList<>();
10131013
attributes.add(new AuthUserAttribute(AuthUserAttributeKey.email(), "[email protected]"));
10141014

10151015
RxAmplify.Auth.signUp(
1016-
"username",
1016+
10171017
null,
10181018
AuthSignUpOptions.builder().userAttributes(attributes).build()
10191019
)
@@ -1033,7 +1033,7 @@ RxAmplify.Auth.signUp(
10331033

10341034
// Confirm sign up with the OTP received
10351035
RxAmplify.Auth.confirmSignUp(
1036-
"username",
1036+
10371037
"123456"
10381038
)
10391039
.subscribe(
@@ -1237,7 +1237,7 @@ fun autoSignIn() {
12371237
suspend fun confirmSignUp(username: String, confirmationCode: String) {
12381238
// Confirm sign up with the OTP received then auto sign in
12391239
val result = Amplify.Auth.confirmSignUp(
1240-
"username",
1240+
12411241
"123456"
12421242
)
12431243

src/pages/[platform]/build-a-backend/auth/connect-your-frontend/switching-authentication-flows/index.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ try {
399399
.preferredFirstFactor(AuthFactorType.PASSWORD_SRP) // or "PASSWORD"
400400
.build()
401401
val result = Amplify.Auth.signIn(
402-
username = "username",
402+
username = "[email protected]",
403403
password = "password",
404404
options = options
405405
)
@@ -418,7 +418,7 @@ try {
418418
.preferredFirstFactor(AuthFactorType.WEB_AUTHN) // or "EMAIL_OTP" or "SMS_OTP"
419419
.build()
420420
val result = Amplify.Auth.signIn(
421-
username = "username",
421+
username = "[email protected]",
422422
password = null,
423423
options = options
424424
)
@@ -549,7 +549,7 @@ AuthSignInOptions options = AWSCognitoAuthSignInOptions.builder()
549549
.authFlowType(AuthFlowType.USER_PASSWORD_AUTH)
550550
.build();
551551
Amplify.Auth.signIn(
552-
"username",
552+
553553
"password",
554554
options,
555555
result -> Log.i("AuthQuickStart", "Sign in succeeded with result " + result),
@@ -565,7 +565,7 @@ val options = AWSCognitoAuthSignInOptions.builder()
565565
.authFlowType(AuthFlowType.USER_PASSWORD_AUTH)
566566
.build()
567567
Amplify.Auth.signIn(
568-
"username",
568+
569569
"password",
570570
options,
571571
{ result ->
@@ -586,7 +586,7 @@ try {
586586
.authFlowType(AuthFlowType.USER_PASSWORD_AUTH)
587587
.build()
588588
val result = Amplify.Auth.signIn(
589-
username = "username",
589+
username = "[email protected]",
590590
password = "password",
591591
options = options
592592
)
@@ -603,7 +603,7 @@ try {
603603
AuthSignInOptions options = AWSCognitoAuthSignInOptions.builder()
604604
.authFlowType(AuthFlowType.USER_PASSWORD_AUTH)
605605
.build();
606-
RxAmplify.Auth.signIn("username", "password", options)
606+
RxAmplify.Auth.signIn("[email protected]", "password", options)
607607
.subscribe(
608608
result -> Log.i("AuthQuickstart", "Next step for sign in is " + result.getNextStep()),
609609
error -> Log.e("AuthQuickstart", error.toString())

0 commit comments

Comments
 (0)