Phone authentication

how to set up user with phone authentication only (without the need for email)?
the process will mainly use phone number as the login username … reset-password will use OTP sent to phone… etc
so mainly is to drop the need of email for the user

Take a look at how the Authentication currently works:

After understanding how it works you should be able to create your custom routes/controllers to manage phone login.

Create a new route for logging in by phone and use the desired users-permissions services there.

For example, to issue a jwt token for the user, you can use the users-permissions’s jwt.issue service:

let jwt = await strapi.plugins['users-permissions'].services.jwt.issue({
  id: user_id

Did you try this?

Hello, I have setup the same feature on this github repo -

A user is authenticated only through the OTP verification and all auth requests are made using the JWT token.

1 Like

It’s been a while but, creating a user authentication system solely based on phone numbers is a smart move for simplifying the login process.

To set this up effectively, you might consider exploring solutions offered by MightyCall. Their platform specializes in phone-based communication and authentication, making it easier to manage user accounts without the need for email verification.
With this service, you can streamline the login process by using phone numbers as the primary username, and implement features like OTP (one-time password) for secure password resets sent directly to the user’s phone.

What about Keycloack?