diff --git a/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in/index.mdx b/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in/index.mdx index b6f8d89bcbb..d19dc10329e 100644 --- a/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in/index.mdx +++ b/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in/index.mdx @@ -1068,7 +1068,7 @@ The `nextStep` property is of enum type `AuthSignInStep`. Depending on its value ```java try { Amplify.Auth.signIn( - "username", + "hello@example.com", "password", result -> { @@ -1184,7 +1184,7 @@ try { ```kotlin try { Amplify.Auth.signIn( - "username", + "hello@example.com", "password", { result -> val nextStep = result.nextStep @@ -1291,7 +1291,7 @@ try { ```kotlin try { val result = Amplify.Auth.signIn( - "username", + "hello@example.com", "password" ) val nextStep = result.nextStep @@ -1391,7 +1391,7 @@ try { ```java -RxAmplify.Auth.signIn("username", "password").subscribe( +RxAmplify.Auth.signIn("hello@example.com", "password").subscribe( result -> { AuthNextSignInStep nextStep = result.getNextStep(); diff --git a/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx b/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx index 178b16d10fe..49814c6daaa 100644 --- a/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx +++ b/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx @@ -1860,7 +1860,7 @@ AWSCognitoAuthSignInOptions options = .callingActivity(callingActivity) .build(); Amplify.Auth.signIn( - "username", + "hello@example.com", null, options, result -> { @@ -1885,7 +1885,7 @@ val options = AWSCognitoAuthSignInOptions.builder() .callingActivity(callingActivity) .build() Amplify.Auth.signIn( - "username", + "hello@example.com", null, options, { result -> @@ -1913,7 +1913,7 @@ try { .callingActivity(callingActivity) .build() val result = Amplify.Auth.signIn( - username = "username", + username = "hello@example.com", password = null, options = options ) @@ -1939,7 +1939,7 @@ AWSCognitoAuthSignInOptions options = .authFlowType(AuthFlowType.USER_AUTH) .callingActivity(callingActivity) .build(); -RxAmplify.Auth.signIn("username", null, options) +RxAmplify.Auth.signIn("hello@example.com", null, options) .subscribe( result -> { if (result.getNextStep().getSignInStep() == AuthSignInStep.CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION) { diff --git a/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-up/index.mdx b/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-up/index.mdx index c3655f4f8cd..f06dcbdb8bc 100644 --- a/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-up/index.mdx +++ b/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-up/index.mdx @@ -587,7 +587,7 @@ ArrayList attributes = new ArrayList<>(); attributes.add(new AuthUserAttribute(AuthUserAttributeKey.phoneNumber(), "+15551234567")); Amplify.Auth.signUp( - "username", + "hello@example.com", null, AuthSignUpOptions.builder().userAttributes(attributes).build(), result -> { @@ -605,7 +605,7 @@ Amplify.Auth.signUp( // Confirm sign up with the OTP received Amplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456", result -> { if (result.isSignUpComplete()) { @@ -631,7 +631,7 @@ val options = .build() Amplify.Auth.signUp( - "username", + "hello@example.com", null, options, { result -> @@ -649,7 +649,7 @@ Amplify.Auth.signUp( // Confirm sign up with the OTP received Amplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456", { result -> if (result.nextStep.signUpStep == AuthSignUpStep.DONE) { @@ -673,7 +673,7 @@ val options = .builder() .userAttributes(attributes) .build() -var result = Amplify.Auth.signUp("username", null, options) +var result = Amplify.Auth.signUp("hello@example.com", null, options) if (result.isSignUpComplete) { Log.i("AuthQuickstart", "Sign up is complete") @@ -686,7 +686,7 @@ if (result.isSignUpComplete) { // Confirm sign up with the OTP received result = Amplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456" ) @@ -704,7 +704,7 @@ ArrayList attributes = new ArrayList<>(); attributes.add(new AuthUserAttribute(AuthUserAttributeKey.phoneNumber(), "+15551234567")); RxAmplify.Auth.signUp( - "username", + "hello@example.com", null, AuthSignUpOptions.builder().userAttributes(attributes).build() ) @@ -724,7 +724,7 @@ RxAmplify.Auth.signUp( // Confirm sign up with the OTP received RxAmplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456" ) .subscribe( @@ -896,7 +896,7 @@ ArrayList attributes = new ArrayList<>(); attributes.add(new AuthUserAttribute(AuthUserAttributeKey.email(), "hello@example.com")); Amplify.Auth.signUp( - "username", + "hello@example.com", null, AuthSignUpOptions.builder().userAttributes(attributes).build(), result -> { @@ -914,7 +914,7 @@ Amplify.Auth.signUp( // Confirm sign up with the OTP received Amplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456", result -> { if (result.isSignUpComplete()) { @@ -940,7 +940,7 @@ val options = .build() Amplify.Auth.signUp( - "username", + "hello@example.com", null, options, { result -> @@ -958,7 +958,7 @@ Amplify.Auth.signUp( // Confirm sign up with the OTP received Amplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456", { result -> if (result.nextStep.signUpStep == AuthSignUpStep.DONE) { @@ -982,7 +982,7 @@ val options = .builder() .userAttributes(attributes) .build() -var result = Amplify.Auth.signUp("username", null, options) +var result = Amplify.Auth.signUp("hello@example.com", null, options) if (result.isSignUpComplete) { Log.i("AuthQuickstart", "Sign up is complete") @@ -995,7 +995,7 @@ if (result.isSignUpComplete) { // Confirm sign up with the OTP received result = Amplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456" ) @@ -1013,7 +1013,7 @@ ArrayList attributes = new ArrayList<>(); attributes.add(new AuthUserAttribute(AuthUserAttributeKey.email(), "my@email.com")); RxAmplify.Auth.signUp( - "username", + "hello@example.com", null, AuthSignUpOptions.builder().userAttributes(attributes).build() ) @@ -1033,7 +1033,7 @@ RxAmplify.Auth.signUp( // Confirm sign up with the OTP received RxAmplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456" ) .subscribe( @@ -1237,7 +1237,7 @@ fun autoSignIn() { suspend fun confirmSignUp(username: String, confirmationCode: String) { // Confirm sign up with the OTP received then auto sign in val result = Amplify.Auth.confirmSignUp( - "username", + "hello@example.com", "123456" ) diff --git a/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/switching-authentication-flows/index.mdx b/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/switching-authentication-flows/index.mdx index ef4f97e0377..4c4c3f8f676 100644 --- a/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/switching-authentication-flows/index.mdx +++ b/src/pages/[platform]/build-a-backend/auth/connect-your-frontend/switching-authentication-flows/index.mdx @@ -399,7 +399,7 @@ try { .preferredFirstFactor(AuthFactorType.PASSWORD_SRP) // or "PASSWORD" .build() val result = Amplify.Auth.signIn( - username = "username", + username = "hello@example.com", password = "password", options = options ) @@ -418,7 +418,7 @@ try { .preferredFirstFactor(AuthFactorType.WEB_AUTHN) // or "EMAIL_OTP" or "SMS_OTP" .build() val result = Amplify.Auth.signIn( - username = "username", + username = "hello@example.com", password = null, options = options ) @@ -549,7 +549,7 @@ AuthSignInOptions options = AWSCognitoAuthSignInOptions.builder() .authFlowType(AuthFlowType.USER_PASSWORD_AUTH) .build(); Amplify.Auth.signIn( - "username", + "hello@example.com", "password", options, result -> Log.i("AuthQuickStart", "Sign in succeeded with result " + result), @@ -565,7 +565,7 @@ val options = AWSCognitoAuthSignInOptions.builder() .authFlowType(AuthFlowType.USER_PASSWORD_AUTH) .build() Amplify.Auth.signIn( - "username", + "hello@example.com", "password", options, { result -> @@ -586,7 +586,7 @@ try { .authFlowType(AuthFlowType.USER_PASSWORD_AUTH) .build() val result = Amplify.Auth.signIn( - username = "username", + username = "hello@example.com", password = "password", options = options ) @@ -603,7 +603,7 @@ try { AuthSignInOptions options = AWSCognitoAuthSignInOptions.builder() .authFlowType(AuthFlowType.USER_PASSWORD_AUTH) .build(); -RxAmplify.Auth.signIn("username", "password", options) +RxAmplify.Auth.signIn("hello@example.com", "password", options) .subscribe( result -> Log.i("AuthQuickstart", "Next step for sign in is " + result.getNextStep()), error -> Log.e("AuthQuickstart", error.toString())