Suljettu

send OTP using sms to verify phone number upon first time registeration using Django and Twilio

I have a Django web app. I made registration form that is working with no issue. I want to add to it the OTP code to verify the entered phone number for only one time when the user register for the first time. (no need for login or out). So user can not sign up unless entered the sms code then the account will be created. I have my own registeration code that I do not want to change. Now, when the user fill in the form, the form will be submitted through ajax request. If there are errors, the errors will show up for user to correct them. If the form is valid, then sms will be sent to the entered phone and a new page with have the field for getting the sent code.

I want some body help me to finish the code as follow:

1- Write a custom code to generate the OTP and send it using twilio (the account is ready and tested)

2- Save the generated code in session alongside with other user model that have been validated

3- If the user submit the code form with correct OTP the account will be created and user will be active

4- If the user fail, there will be a button to send a new code if the user chose to. However, the user will be allowed to try only 3 times, if does not success, the user will be prevented from register for next 12 hours

5- If user success the account is created and user is active

NO plugin is allowed

HERE IS THE VIEW FUNCTION FOR REGISTERATION:

def LMRegisterSubmitForm(request):

if [login to view URL] == 'POST' and request.is_ajax:

form = LMUserRegisterForm([login to view URL] or None)

if form.is_valid():

user = [login to view URL](commit=False)

# deactive user untill click the url sent to a user email

user.is_active = False

user.is_staff = False

user.is_superuser = False

password = form.cleaned_data['password']

user.set_password(password)

# [login to view URL]()

# save new registered user's data into session

[login to view URL]['new_user_info'] = user

# to register new password into user pass word record model

# password_log = PasswordLog()

# [login to view URL] = user

# [login to view URL] = [login to view URL]

# [login to view URL]()

# send sms to the phone

data = {

'success': 'تم إنشاء الحساب بنجاح.',

}

data = [login to view URL](data, indent=4, sort_keys=False, default=str)

return JsonResponse(data, safe=False)

else:

errors = dict([login to view URL])

data = {

'fail': 'لقد تعذر تسجيل حسابك، هناك بعض الأخطاء بالحقول المدخلة. يرجى تعديلها والمحاولة من جديد',

'errors': errors,

}

data = [login to view URL](data, indent=4, sort_keys=False, default=str)

return JsonResponse(data, safe=False)

else:

return redirect("register")

Taidot: Python, Django

Tietoa asiakkaasta:
( 41 arvostelua ) San Antonio, United States

Projektin tunnus: #33743484

10 freelanceria on tarjonnut keskimäärin $65 tähän työhön

(40 arvostelua)
5.4
mahmoudkhayrall8

Dear, I have read your description and I'm ready to start immediately in the mentioned budget in my bid "70$". my Approach: - create separate model for phone number(number, user, confirmed, last_confirm_trial, confir Lisää

$70 USD 1 päivässä
(8 arvostelua)
4.9
VirtualBrainInc

Hello, I have briefly read the description on; Python Django project, and I can deliver as per the requirements however I need us to discuss for more clarity on the details, deadline and budget as well. I reach out to Lisää

$200 USD 5 päivässä
(6 arvostelua)
4.2
Work12345x

Hi, I am a very talented software programmer with 13+ years of development experience (5+ years professional work experience). I am a results-oriented professional and possess experience using cutting-edge development Lisää

$20 USD 1 päivässä
(4 arvostelua)
2.3
Sarsed

Hi, Manager This project is very suit for me, python expert. I am sure I can complete this project within a day, make yo sure satisfied enough. Please contact me. Looking forward for your response. Thanks

$50 USD 1 päivässä
(3 arvostelua)
2.0
lakimo21

Hey Mate! I read your job "send OTP using sms to verify phone number upon first time registeration using Django and Twilio" carefully and I can do your job perfectly. I have developed many websites and ready for you no Lisää

$20 USD 1 päivässä
(0 arvostelua)
0.0
sabribaccar71

Hello , I have seen your job requirements and I am sure that I can do your task efficiently in less timeline as we are a team of engineers of 3 people, each one has an experience of 5+ years we are specialized in web d Lisää

$50 USD 7 päivässä
(0 arvostelua)
0.0
SeanHarkin

I’ve experience with using twilio for sms and think I can complete the project for you for a reasonable price

$35 USD 5 päivässä
(0 arvostelua)
0.0
gtnt20905baroli

Immediately start I have read your project description very carefully and ready to solve your task and problem immediately. I am software developer having 10+years experience in web development more then 100+ websit Lisää

$100 USD 2 päivässä
(0 arvostelua)
0.0
LKD35

Hi, I am 4 years experienced Software Developer. I work on Python and PHP mostly and respective frameworks Django and Laravel. My other skills are - MySQL, Javascript, jQuery, JSON and Ajax. I can also convert PSD to H Lisää

$30 USD 3 päivässä
(0 arvostelua)
0.0