Send code to sms # for 2 factor auth

38 views
Skip to first unread message

Jim S

unread,
Jul 19, 2022, 4:18:33 PMJul 19
to web2py-users
Hi

I'm looking to modify my web2py login to do a poor man's 2 factor auth.

I would like my login to proceed like this:

1. present login page
2. user fills out username/password and submits
3. if username/password match proceed to step 4  - if not, re-display login page
4. send sms message with random 6 digit code to the user cell phone
5. pop up screen for user to enter the 6 digit code
6. If the code matches the generated code then set the user as logged in - if it doesn't match, then the user is not logged in

Has anyone done anything like this before? I'm trying to figure out how to pop up the additional screen and take input before marking user as logged in.  

-Jim

Jim S

unread,
Jul 19, 2022, 4:51:55 PMJul 19
to web2py-users

Jim S

unread,
Jul 19, 2022, 5:34:44 PMJul 19
to web2py-users
For those who care, this was super-simple to implement once I took the time to read the manual.  I implemented using RingCentral as a transport to send sms messages.

-Jim

Dave S

unread,
Aug 5, 2022, 8:00:36 PMAug 5
to web2py-users
On Tuesday, July 19, 2022 at 2:34:44 PM UTC-7 Jim S wrote:
For those who care, this was super-simple to implement once I took the time to read the manual.  I implemented using RingCentral as a transport to send sms messages.

-Jim

I love a self-help success story!  Congratulations!  

/dps
 
Reply all
Reply to author
Forward
0 new messages