aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.82k stars 820 forks source link

Authentication using phone number only #1723

Open itaisteinherz opened 5 years ago

itaisteinherz commented 5 years ago

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

attilah commented 5 years ago

@itaisteinherz thanks for the feature request I take this to the team and get back to you with the result of our discussion.

seyofori commented 5 years ago

@attilah any updates?

yelhow commented 5 years ago

@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”

KOSSOKO commented 4 years ago

@attilah any update ?

RolandBarro commented 4 years ago

I am facing the same issue


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”
}*/
RolandBarro commented 4 years ago

I have temporary solution for this issue so that I can just move on, but we need to have phone only signup feature for this, thank you.


      const email = 'any.email@admin.com';

      const signUpObj = {
        username,
        password: Date.now().toString(),
        attributes: {
          email,
        }
      };

      const signUp = this._auth.signUp(signUpObj);
// work on results below
alsenydiallo commented 3 years ago

@itaisteinherz thanks for the feature request I take this to the team and get back to you with the result of our discussion.

Any updates on this feature request ?

avlonder commented 3 years ago

I fully agree that this is a very relevant feature request!

josefaidt commented 2 years ago

cc @palpatim @elorzafe for visibility

josefaidt commented 2 years ago

This feature still stands as with the current "phone number" login mechanism still requires an associated email and password (using Amplify CLI 7.6.24), whereas this is requesting "phone number" login with SMS TOTP

image
rodrigogs commented 3 months ago

Wow, nothing since 2022