Is your feature request related to a problem? Please describe.
Yes - when I tried using Amplify for authenticating users using a phone number and TOTP, I ran into some issues.
Describe the solution you'd like
I'd like there to be another "alternative sign in" option, where you can sign up/sign in using your phone number only (and TOTP for verification on both registration and login).
Describe alternatives you've considered
You could use the hash of the phone number as the username, the phone number as the password, and enable MFA. However, that would be extremely hack-y, and so I'd prefer not to use it.
Additional context
aws-amplify/aws-sdk-android#1012 (and more specifically https://github.com/aws-amplify/aws-sdk-android/issues/1012#issuecomment-505580288).
// cc @undefobj
@itaisteinherz thanks for the feature request I take this to the team and get back to you with the result of our discussion.
@attilah any updates?
@attilah any update on this issue. I am facing the same problem.
---------> Phone Signup Error ---->
{code: “InvalidParameterException”, name: “InvalidParameterException”, message: “Attributes did not conform to the schema: email: The attribute is required↵“}
code: “InvalidParameterException”
message: “Attributes did not conform to the schema: email: The attribute is required↵”
name: “InvalidParameterException”
@attilah any update ?
```// snippet
const signUpObj = {
“ClientId”: “myClientId”,
“Username”: “+12027953213”,
“Password”: “1595375749602”,
“UserAttributes”: [],
“ValidationData”: null
};
try {
const result: SignUpResult = await Auth.signUp(signUpObj);
resolve(result);
} catch(error) {
console.log(error)
}
// end of snippet
// result:
/*
{
“__type”: “InvalidParameterException”,
“message”: “Attributes did not conform to the schema: email: The attribute is required\n”
}*/
```const username = this.phone_number.value;
const email = 'any.[email protected]';
const signUpObj = {
username,
password: Date.now().toString(),
attributes: {
email,
}
};
const signUp = this._auth.signUp(signUpObj);
// work on results below
Most helpful comment
@attilah any updates?