93
Views
11
Comments
Verification of Mobile Number with OTP
Question
Application Type
Reactive

I am creating Reactive Web App. In which, I want to do Login screen verification of Mobile Number send With OTP. Please Someone explain to me about it by an example/OML File

Thankyou 

2024-06-01 07-14-16
Vaishali Thakur

Hello, @Priya Jhode 

This is post-OTP generation to help you, 

Thanks 

2024-06-30 04-29-36
Priya Jhode

can you please make a functionality and share oml file,

thanks @Vaishali Bhatt 

2024-09-26 10-22-06
Siva D

Hi Priya,

        You can use this component to send OTP to mobile number.

2021-11-12 04-59-31
Manikandan Sambasivam

To create a login screen with OTP verification for a mobile number in a Reactive Web App in OutSystems,

  1. Create a Screen for Mobile Number Input: This screen will allow the user to enter their mobile number and request an OTP.

  2. Generate and Send OTP: Implement logic to generate a random OTP and send it to the user's mobile number. This usually involves integrating with an SMS gateway service.

  3. Create a Screen for OTP Input: This screen will allow the user to enter the OTP they received.

  4. Verify OTP: Implement logic to verify the entered OTP against the generated OTP.

Step 1: Create a Screen for Mobile Number Input

  1. Create a new screen named Login.
  2. Add an input field for the mobile number and a button to request the OTP.
  3. Define a local variable to store the mobile number.
  4. Create a Server Action named RequestOTP to generate and send the OTP.

Step 2: Generate and Send OTP

  1. Create a Server Action named GenerateAndSendOTP.
  2. Generate a random OTP (e.g., a 6-digit number).
  3. Store the OTP and the mobile number in the database or session.
  4. Send the OTP using an SMS service API (like Twilio).

Step 3: Create a Screen for OTP Input

  1. Create a new screen named VerifyOTP.
  2. Add an input field for the OTP and a button to verify it.
  3. Define a local variable to store the entered OTP.
  4. Create a Server Action named VerifyOTPAction to check the OTP.

Step 4: Verify OTP

  1. Create a Server Action named VerifyOTPAction.
  2. Retrieve the stored OTP from the database/session based on the mobile number.
  3. Compare the entered OTP with the stored OTP.
  4. Handle success or failure (e.g., navigate to the home screen or show an error message).
2024-05-14 06-49-08
Karnika-EONE

Hi @Priya jhode

1.For Verification of Mobile Number with OTP,You need to create Twilio Account.

https://console.twilio.com/


2.And You will Get API and Authentication Tokens.

3.You need to createREST  API in your module and Authenticate using your generated token.

4.You will get reponse.

5.You can use your response in your server action.

For more Further details..I will upload OML..Once it is completed.

Best Regards,

Thanks

Karnika.K

2024-06-30 04-29-36
Priya Jhode

okk..please share oml

Thank you @Karnika-EONE 

UserImage.jpg
Garima Sharma

Hi Priya ,

Please see ForgetPassword screen in the attached oml in that i have used verification of OTP

JoinRecord.oml
2024-06-30 04-29-36
Priya Jhode

Thankyou @Garima Sharma 

2024-05-14 06-49-08
Karnika-EONE

Hi @Priya Jhode

1.First You need to create Twilio Account : https://console.twilio.com/.

2.After creating Account You will find these credentails in twiliio dashboard.You need to save this informations.

3.That Twilio Number is a virtual number (i.e.from number) as this is trial account.

4.Postman link:having API of twilio

5.EndPOint:

https://api.twilio.com/2010-04-01/Accounts/AC1d9eefab8eac37c0e63f7a9620e83d63/Messages.json

6.Authentication:usename:AcountSID

Password:Auth Token.

7.You need to Pass TO and From And Body to that API.

7.After getting response.You will get OTP,

8.After that You can customize the login logic.(I have attached the logics in the OML).

Best Regards,

Thanks

Karnika.K.

TwilioMessage.oml
2024-06-30 04-29-36
Priya Jhode

thankyou @Karnika-EONE 

2025-01-21 04-09-22
Mukesh Kumar

@Karnika-EONE  I Reviewed your Oml, but its not working the way you did.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.