-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace usages of username with email
- Loading branch information
Showing
4 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1068,7 +1068,7 @@ The `nextStep` property is of enum type `AuthSignInStep`. Depending on its value | |
```java | ||
try { | ||
Amplify.Auth.signIn( | ||
"username", | ||
"[email protected]", | ||
"password", | ||
result -> | ||
{ | ||
|
@@ -1184,7 +1184,7 @@ try { | |
```kotlin | ||
try { | ||
Amplify.Auth.signIn( | ||
"username", | ||
"[email protected]", | ||
"password", | ||
{ result -> | ||
val nextStep = result.nextStep | ||
|
@@ -1291,7 +1291,7 @@ try { | |
```kotlin | ||
try { | ||
val result = Amplify.Auth.signIn( | ||
"username", | ||
"[email protected]", | ||
"password" | ||
) | ||
val nextStep = result.nextStep | ||
|
@@ -1391,7 +1391,7 @@ try { | |
<Block name="RxJava"> | ||
|
||
```java | ||
RxAmplify.Auth.signIn("username", "password").subscribe( | ||
RxAmplify.Auth.signIn("[email protected]", "password").subscribe( | ||
result -> | ||
{ | ||
AuthNextSignInStep nextStep = result.getNextStep(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1860,7 +1860,7 @@ AWSCognitoAuthSignInOptions options = | |
.callingActivity(callingActivity) | ||
.build(); | ||
Amplify.Auth.signIn( | ||
"username", | ||
"[email protected]", | ||
null, | ||
options, | ||
result -> { | ||
|
@@ -1885,7 +1885,7 @@ val options = AWSCognitoAuthSignInOptions.builder() | |
.callingActivity(callingActivity) | ||
.build() | ||
Amplify.Auth.signIn( | ||
"username", | ||
"[email protected]", | ||
null, | ||
options, | ||
{ result -> | ||
|
@@ -1913,7 +1913,7 @@ try { | |
.callingActivity(callingActivity) | ||
.build() | ||
val result = Amplify.Auth.signIn( | ||
username = "username", | ||
username = "[email protected]", | ||
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("[email protected]", null, options) | ||
.subscribe( | ||
result -> { | ||
if (result.getNextStep().getSignInStep() == AuthSignInStep.CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -587,7 +587,7 @@ ArrayList<AuthUserAttribute> attributes = new ArrayList<>(); | |
attributes.add(new AuthUserAttribute(AuthUserAttributeKey.phoneNumber(), "+15551234567")); | ||
|
||
Amplify.Auth.signUp( | ||
"username", | ||
"[email protected]", | ||
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", | ||
"[email protected]", | ||
"123456", | ||
result -> { | ||
if (result.isSignUpComplete()) { | ||
|
@@ -631,7 +631,7 @@ val options = | |
.build() | ||
|
||
Amplify.Auth.signUp( | ||
"username", | ||
"[email protected]", | ||
null, | ||
options, | ||
{ result -> | ||
|
@@ -649,7 +649,7 @@ Amplify.Auth.signUp( | |
|
||
// Confirm sign up with the OTP received | ||
Amplify.Auth.confirmSignUp( | ||
"username", | ||
"[email protected]", | ||
"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("[email protected]", 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", | ||
"[email protected]", | ||
"123456" | ||
) | ||
|
||
|
@@ -704,7 +704,7 @@ ArrayList<AuthUserAttribute> attributes = new ArrayList<>(); | |
attributes.add(new AuthUserAttribute(AuthUserAttributeKey.phoneNumber(), "+15551234567")); | ||
|
||
RxAmplify.Auth.signUp( | ||
"username", | ||
"[email protected]", | ||
null, | ||
AuthSignUpOptions.builder().userAttributes(attributes).build() | ||
) | ||
|
@@ -724,7 +724,7 @@ RxAmplify.Auth.signUp( | |
|
||
// Confirm sign up with the OTP received | ||
RxAmplify.Auth.confirmSignUp( | ||
"username", | ||
"[email protected]", | ||
"123456" | ||
) | ||
.subscribe( | ||
|
@@ -896,7 +896,7 @@ ArrayList<AuthUserAttribute> attributes = new ArrayList<>(); | |
attributes.add(new AuthUserAttribute(AuthUserAttributeKey.email(), "[email protected]")); | ||
|
||
Amplify.Auth.signUp( | ||
"username", | ||
"[email protected]", | ||
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", | ||
"[email protected]", | ||
"123456", | ||
result -> { | ||
if (result.isSignUpComplete()) { | ||
|
@@ -940,7 +940,7 @@ val options = | |
.build() | ||
|
||
Amplify.Auth.signUp( | ||
"username", | ||
"[email protected]", | ||
null, | ||
options, | ||
{ result -> | ||
|
@@ -958,7 +958,7 @@ Amplify.Auth.signUp( | |
|
||
// Confirm sign up with the OTP received | ||
Amplify.Auth.confirmSignUp( | ||
"username", | ||
"[email protected]", | ||
"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("[email protected]", 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", | ||
"[email protected]", | ||
"123456" | ||
) | ||
|
||
|
@@ -1013,7 +1013,7 @@ ArrayList<AuthUserAttribute> attributes = new ArrayList<>(); | |
attributes.add(new AuthUserAttribute(AuthUserAttributeKey.email(), "[email protected]")); | ||
|
||
RxAmplify.Auth.signUp( | ||
"username", | ||
"[email protected]", | ||
null, | ||
AuthSignUpOptions.builder().userAttributes(attributes).build() | ||
) | ||
|
@@ -1033,7 +1033,7 @@ RxAmplify.Auth.signUp( | |
|
||
// Confirm sign up with the OTP received | ||
RxAmplify.Auth.confirmSignUp( | ||
"username", | ||
"[email protected]", | ||
"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", | ||
"[email protected]", | ||
"123456" | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -399,7 +399,7 @@ try { | |
.preferredFirstFactor(AuthFactorType.PASSWORD_SRP) // or "PASSWORD" | ||
.build() | ||
val result = Amplify.Auth.signIn( | ||
username = "username", | ||
username = "[email protected]", | ||
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 = "[email protected]", | ||
password = null, | ||
options = options | ||
) | ||
|
@@ -549,7 +549,7 @@ AuthSignInOptions options = AWSCognitoAuthSignInOptions.builder() | |
.authFlowType(AuthFlowType.USER_PASSWORD_AUTH) | ||
.build(); | ||
Amplify.Auth.signIn( | ||
"username", | ||
"[email protected]", | ||
"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", | ||
"[email protected]", | ||
"password", | ||
options, | ||
{ result -> | ||
|
@@ -586,7 +586,7 @@ try { | |
.authFlowType(AuthFlowType.USER_PASSWORD_AUTH) | ||
.build() | ||
val result = Amplify.Auth.signIn( | ||
username = "username", | ||
username = "[email protected]", | ||
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("[email protected]", "password", options) | ||
.subscribe( | ||
result -> Log.i("AuthQuickstart", "Next step for sign in is " + result.getNextStep()), | ||
error -> Log.e("AuthQuickstart", error.toString()) | ||
|