Member-only story

Implement OTP based Authentication on Django-rest-framework for E-commerce with Knox-token

Use Django rest framework to implement one-time verification code (OTP)

Gautamankul
7 min readJun 4, 2022

Rinu Gour TDS Editors Python Django Girls NYC Aman Kharwal

Implement OTP based Authentication on Django-rest-framework for E-commerce

Hey Medium family ! Today we are going to Implement OTP based Authentication on Django-rest-framework for E-commerce .

Prerequisite

We only require some libraries for the Django REST framework.

  1. Django
  2. Django REST framework
  3. django-rest-knox

Agenda

  1. Frist we gone register user with username ,email, phone number & etc.
  2. After Registration we will go verified phone number and.
  3. If user want to login we want phone number from user if user is exist then we will provide OTP ,otherwise we gone provide a message user is not exist please register .

Setup

We are using Virtualenv for project environment creation and in that project.

Here I am using Windows 10, so I am going use pip instead of pip3 for Ubuntu or other Linux distro .

--

--

Gautamankul
Gautamankul

Written by Gautamankul

A Software Developer Engineer & Entrepreneur and along with i am a Buddhist.

No responses yet