Sign up using phone number and login using phone number

Hello everyone,

I’m currently working on a project that involves integrating OTP (One-Time Password) authentication into my Bubble.io application using ClickSend SMS for sending the OTP codes. While I’ve managed to set up the API and send SMS messages, I’m facing some challenges with the OTP verification and user login process.

Here’s what I’ve accomplished so far:

  • API Integration: Successfully sending OTP codes via ClickSend SMS.
  • UI Setup: Created input fields and buttons for entering phone numbers and OTP codes.

However, I’m encountering difficulties with the following:

  • Verifying OTP: Checking if the entered OTP matches the one sent and handling OTP expiry.
  • User Login: Logging in the user without relying on email and password, as I’m focusing on phone-based authentication.

Specific Areas Where I Need Help:

  1. Custom Workflow for OTP Verification: Guidance on setting up workflows in Bubble.io to verify the OTP code and handle expired codes.
  2. Managing User Sessions: Suggestions on how to manage user sessions and simulate a login process without using email and password.

If anyone has experience with similar integrations or can provide advice on best practices, I would greatly appreciate your help. Please let me know if you have any resources, tips, or if you’re available for a more detailed discussion.

Thank you in advance for your support!

Best regards,

Hi, I suppose you should go on something like this. But did not try.

From what I see in the ClcikSend doc:

  • You use the Verify Own Number OTP call
  • Response is success and response’s status is “APPROVED” you can go on
  • Response is success and response’s status is not “APPROVED” and remaining_attempts > 0, then try again
  • Response is success and response’s status is not “APPROVED” and remaining_attempts is 0, then you ve got to generate another code
  • Response is not success, try again later

It seems that ClickSend handles the expiry part with updating the status (but a test in real condition is necessary to be sure of that)

User login:

  • use the assign temp password + login with user’s email and result of step assign temp passowrd (make sure that in setting > general: redirect users who haven’t change their password is empty)
  • trigger this custom workflow only if the result of the step Verify Own Number OTP’s status is “APPROVED”
  • and add a Go To Page action to redirect to his account
1 Like

thank you man, this put me on the right path

This topic was automatically closed after 70 days. New replies are no longer allowed.