Enhancement 2

Auth using Custom SMS

In this project we have used Firebase auth, Cutom auth, and a new auth method is using which is auth using SMS service.

Backend Configuration

  1. In this type of SMS auth type different type of SMS servies are integrated.

  2. There new option at country courrency section where user can select "SMS Auth"

  1. When Creating or editing coutry admin can select Auth method

  2. IF admin select auth method "SMS auth" there will be a drop down showing all SMS integrated sms services and admin can select .

SMS Integration

  1. There will be a new Menu shows SMS services. which country depended.

  2. A single SMS service can operate on mutiple country. Only key will be different.

  3. Key can be configured at the CountrySMS menu

Work Flow

Process Overview:

  1. Country Selection: The system should allow the user to select their country, which can help in determining the country code for phone numbers and configuring localized SMS services.

  2. Auth Type Selection: Users select the SMS authentication method, indicating they want to authenticate via a code sent to their mobile number.

  3. SMS Module Activation:

    • Check for Active SMS Module: Ensure that the SMS module is active and configured properly for the specified country.

    • Select SMS Provider: The system selects an appropriate SMS provider based on availability, cost, and reliability for the user's region.

  4. Sending OTP:

    • Send OTP Request: A request to send an OTP (One-Time Password) is made to the SMS provider.

    • OTP Delivery: The provider sends the OTP to the user's mobile number.

  5. API Integration:

    • Post API for SMS Request:

      • Endpoint: /login-sms

      • Payload

Description: This API call is made from the mobile client to the backend to initiate the SMS authentication process.

  • Post API for OTP Verification:

    • Endpoint: /login-sms-verify

    • Payload:

    • Description: This API call is made to verify the OTP received by the user. Upon successful verification, a bearer token is generated.

  • Bearer Token Generation: After successful OTP verification, a bearer token is generated for the user to authenticate future requests.

Last updated