Simple two factor authentication in Django with SMS verification code | basic 2fa using Twilio

preview_player
Показать описание
Basic two factor authentication (2fa) in Django with Twilio

In this tutorial we are going to build a simple two factor authentication system in a Django project with SMS using Twilio. In order to implement this functionality we will use among others:
➜ django signals
➜ custom user class with a phone number field
➜ sending SMS with Twilio
Please check the links above where these topics are covered in greater details

🔥 MY BEST DJANGO COURSE with discount % (Django & Tailwind CSS Udemy course) :

🔥 Join the facebook group:

🔥 Follow pyplane on:

🔥 More on python and django:

Links:
➜ Extend the User model with AbstractUser class:

#Django #2fa #twilio

two factor authentication django, 2fa django, django twilio sms, two factor auth django, 2fa example, extend user model django, django signals, django signals post_save, django signals post_save example, django tutorial 2021, two-factor authentication (2fa), sms api python, sms verification code, twilio sms, twilio sms tutorial python, twilio sms python, django signals tutorial, abstract user django, abstract user model django, abstract user, Abstractuser class django
Рекомендации по теме
Комментарии
Автор

Hi Guys, as mentioned in the video I'll publish this week the final part of the amazon price tracker project and the 3rd part of the django social network project v2.0. To be honest the main cause of the delay is that I got verrrry busy playing Cyberpunk 😜 Sorry to all the people waiting for those videos - they will come out this week! 💪 Cheers! ✌

Pyplane
Автор

It is perhaps the best YouTube channel on Django...i loved every content delivered by you man...You are amazing

MukeshKumar-mxhb
Автор

Literally Today I was willing to send OTP using Django but didn't get anything and
Then here you came as Life Saver 😍😍

mohitrathore
Автор

Your video is very practical and informative. Please, share a video or give suggestions related to repeatable group fields in Django Models.

zakirhossen
Автор

just found your channel..u r great..to the point content. ..great work dude...

shashankpandey
Автор

Thank you for the lesson it is a very good informative one.
I will use on my website.
Can you, please, make a short video, the code to be sent to users email do not use the Twilio

tudorcozma
Автор

Where can I download the same template from base.html?

pglbcwx
Автор

I suppose we could also generate the code and embed it with the user's session instead of saving it in the database. I wonder, which method is more secured between the two?

IbrahimKMambo
Автор

LUKE brother, Can you explain the use of "through" function of objects in any upcoming video? I am unable to understand the use of it.

AkshayKaushik
Автор

Hi there,
Can you please make tutorial for how we can add file from our drop box or Google drive instead of our own system in file input at from end.
I hope you got it what I'm saying.

abrarahmed
Автор

I didn't get how the new code generates every time you logged in, the signals were called when the user created. I'm a little confused.

osmanhamashool
Автор

Having a lot of issues implementing this code into my project. First of all the code that is generated never generates a new code when login and logout. Also, when verifying code the code does not print into the terminal. Even looking into the admin for the code and trying that code for the user it does nothing whether correct or incorrect. I followed the redirecting as told and does not seem to work. Any help?

shooki
Автор

Hello, I'm just thinking that is it necessary to save the OTP in a model. Can't we just use Twilio's Verify API. Can you please help me with implementing verify API.

showclip
Автор

code=user.code
AttributeError: 'CustomUser' object has no attribute 'code'

hi bro. i wrote ur note. but can u show codes how did u do that? in CustomUser i should put to code.

fratdevrimcavit
Автор

I've followed the tutorial and when I want to connnect after log out I've the error : AttributeError et /login/ 'WSGIRequest'object has no attibute 'sessions'

knightmare-gicg
Автор

Thanks for this great video, i noticed most django tutorial/app uses username and password to login and user can use a single email to register multiple account, can you do a tutorial on achieving login using 'unique' email and password as opposed the username and password. thanks a lot for all your wonderful tutorials

bellosegun
Автор

Great Tutorial video! I followed through but I can't get the SMS from twilio on my phone. I can see the code on my terminal but I don't receive the SMS on my phone. Please what could be the problem?

discoveryunit
Автор

what to do if instead of "username: 57643" the terminal displays "username: Object (1)"? please tell me

КсюСеменюта
Автор

Why not use random library and set as default code when created?

opcon
Автор

Great tutorial! Please how can I implement this on the admin site?

SuperRevolver