One time password to email
Options
Igor Remeniuk
Member ✭
Maybe you can help me. How can i develop the feature - One Time Password. generate, send it on email and user need to enter 4 digits to access
A think a can do it. with Magic Link via SendGrid, but it generates a long token, and i need just 4 numbers
A think a can do it. with Magic Link via SendGrid, but it generates a long token, and i need just 4 numbers
Comments
-
Yes - I've seen people customize the magic link template to do this. Instead of generating a magic token and magic link, they've used the Generate Random Number function to create a random 4 digit number.
This can be stored in the database as an object similar to the Magic Link object, but it would have the 4 digit code, an expiration, and a boolean for if used. Every time a code is generated overwrite the previous object with the new data.
Send the 4 digit code to the user, you'll need to have them input the 4 digit code and check it against the code, expiration time, and boolean in the database. If it all checks out (against Preconditions) then you can create the authentication token and mark the boolean as used.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback