Phone Number Authentication in Strapi V4

Cross posted in Strapi Phone Number Authentication - Stack Overflow.

I would like a way for users to login to Strapi by entering a phone number, receiving a text verification code and entering the code to my app. There is an old thread that talked about this Phone Number authentication in Strapi, but the information there seems to be in Strapi v3. Is this still possible in Strapi v4?

1 Like

Yes, you can use phone number authentication with Strapi v4. You can enable it directly from the admin panel.

I’ve been searching for the answer to this question, and it seems possible. You’ll need to use a plugin that allows you to use a phone number as your authentication method, such as the one from OAuth.io. Once you have the plugin set up, you’ll be able to use a phone number to log in and get a verification code sent to the user. And I highly recommend using a temporary usa phone number when creating an account in any application. It’s a great way to protect your personal data and keep your own number secure.

Are there any examples that work?

In case anyone else looking for this answer. Yes it can be done. On the user profile the “identifier” can hold the phone number. Tried and tested.

Good idea, but how would you verify the phone number?

You could use something like twilio SMS + Secret code (new password) for example. If they login with “code” then ask them to set a new password.