FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    How use mobile number for authentication

    Scheduled Pinned Locked Moved
    Q&A
    3
    5
    4.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mehr.prs
      last edited by

      Hi,
      I want to use mobile number + password as my authentication fields and also
      verify users using SMS verification code in the register process.
      But I don't know how should I do that 🙂

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        Hiya,

        If you want to do this, you'll probably want to have the mobile number be the username (also known as the loginId). You can change the messages file in the theme so that anywhere the username field is shown, the corresponding label is "mobile phone number".

        As far as using SMS verification, that will be something you have to build using the FusionAuth APIs. You would create a user using one of the user apis. Make sure you enable registration verification and then also pass the skipRegistrationVerification parameter to the API call.

        Then, you would send the SMS message using whatever method you want. Include a URL for your application and when the user enters the code correctly, you can call this method: https://fusionauth.io/docs/v1/tech/apis/registrations#resend-a-user-registration-verification-email with sendVerifyRegistrationEmail to false to get a verificationId and then this method to actually verify the number with that verificationId: https://fusionauth.io/docs/v1/tech/apis/registrations#verify-a-user-registration

        So basically you aren't sending any emails at all, you're just using the method calls to update the state of the user to verified.

        Does that help?

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 1
        • M
          mehr.prs
          last edited by mehr.prs

          Yeah, thanks.
          And just another question: do you have any plan to support phone number just like email (to register using phone field, verify using SMS,..)?

          1 Reply Last reply Reply Quote 0
          • V
            voidmain
            last edited by

            Hi @mehr-prs. We have an open issue that is tracking this:

            https://github.com/FusionAuth/fusionauth-issues/issues/1

            This feature is to support multiple identities, but it also covers adding new identity types. As part of this feature, we likely will implement support for phone number identities including full validation and verification for them.

            Please upvote that issue if you feel it covers your requirements. This helps us prioritize features on our roadmap for the rest of 2020.

            1 Reply Last reply Reply Quote 0
            • danD
              dan
              last edited by

              Please feel free to vote for the issue @mehr-prs , if it is important to you. Here's the general FusionAuth roadmap guidance: https://fusionauth.io/community/forum/topic/172/the-fusionauth-roadmap

              --
              FusionAuth - Auth for devs, built by devs.
              https://fusionauth.io

              1 Reply Last reply Reply Quote 0
              • First post
                Last post