This PR adds the functionality to generate, verify, and resend OTPs in the Tartel-API project. It introduces new endpoints for OTP-related operations, uses the Twilio Node.js library to send OTPs to users' phones, and handles errors and edge cases.
Summary of Changes
Created a new file otp-routes.js in the routes directory to handle OTP-related endpoints.
Added three endpoints: one for generating OTPs, one for verifying OTPs, and one for resending OTPs.
Installed the Twilio Node.js library to send OTPs to users' phones.
Implemented OTP generation using a random number generator.
Stored OTPs temporarily for verification.
Handled errors and edge cases, such as invalid phone numbers or OTPs.
Please review and merge this PR to add OTP functionality to the Tartel-API project.
Fixes #2.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/otp-functionality
š Latest improvements to Sweep:
Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
We released a demo of our chunker, where you can find the corresponding blog and code.
š” To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR adds the functionality to generate, verify, and resend OTPs in the Tartel-API project. It introduces new endpoints for OTP-related operations, uses the Twilio Node.js library to send OTPs to users' phones, and handles errors and edge cases.
Summary of Changes
otp-routes.js
in theroutes
directory to handle OTP-related endpoints.Please review and merge this PR to add OTP functionality to the Tartel-API project.
Fixes #2.
To checkout this PR branch, run the following command in your terminal:
š Latest improvements to Sweep:
š” To get Sweep to edit this pull request, you can: