amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Authentication using phone number only

Open itaisteinherz opened this issue 6 years ago • 12 comments
trafficstars

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 avatar Jun 25 '19 20:06 itaisteinherz

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

attilah avatar Jun 26 '19 20:06 attilah

@attilah any updates?

seyofori avatar Aug 07 '19 18:08 seyofori

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

yelhow avatar Aug 28 '19 10:08 yelhow

@attilah any update ?

KOSSOKO avatar Jun 28 '20 23:06 KOSSOKO

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 avatar Jul 22 '20 01:07 RolandBarro

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 = '[email protected]';

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

      const signUp = this._auth.signUp(signUpObj);
// work on results below

RolandBarro avatar Jul 23 '20 21:07 RolandBarro

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

alsenydiallo avatar Apr 07 '21 17:04 alsenydiallo

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

avlonder avatar Apr 08 '21 17:04 avlonder

cc @palpatim @elorzafe for visibility

josefaidt avatar Mar 16 '22 18:03 josefaidt

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

josefaidt avatar Mar 16 '22 20:03 josefaidt

Wow, nothing since 2022

rodrigogs avatar Aug 06 '24 01:08 rodrigogs

Wow, nothing since 2022

:( Really would like this feature.

Sechorda avatar Apr 07 '25 13:04 Sechorda