Coder Social home page Coder Social logo

wpcodevo / django_2fa_project Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 4.0 13 KB

In this article, you'll learn how to add two-factor (2FA) authentication to a Django REST API using TOTP tokens generated by an Authenticator app like Chrome's Authenticator extension, Authy or Google Authenticator.

Home Page: https://codevoweb.com/django-implement-2fa-two-factor-authentication/

Makefile 0.40% Python 99.60%
2fa django django-2fa django-api django-api-framework django-framework django-rest-framework ptop two-factor two-factor-auth

django_2fa_project's Introduction

Django - Implement (2FA) Two-Factor Authentication

In this article, you'll learn how to add two-factor (2FA) authentication to a Django REST API using TOTP tokens generated by an Authenticator app like Chrome's Authenticator extension, Authy or Google Authenticator.

Django - Implement (2FA) Two-Factor Authentication

Topics Covered

  • Run the Django 2FA API Locally
  • Run the Django 2FA API with React.js
  • Setup the Django Project
  • Create Django Models
    • Database Model
    • Model Serializer
  • Implement the Two-Factor Authentication
    • Register User API View
    • Login User API View
    • Generate OTP API View
    • Verify OTP API View
    • Validate OTP API View
    • Disable 2FA API View
  • Create URLs for the API Views
    • Create the APP URLs
    • Include the Base URL in the Project
  • Add CORS Middleware
  • Test the Two-Factor Authentication API
    • Generate the 2FA QRCode
    • Enable the 2FA Feature
    • Validate the TOTP
    • Disable the 2FA Feature
  • Create API Documentation

Read the entire article here: https://codevoweb.com/django-implement-2fa-two-factor-authentication/

Related articles:

  1. Two-factor Authentication (2FA) in FastAPI and Python
  2. How to Implement (2FA) Two-factor Authentication in Golang
  3. How to Implement (2FA) Two-factor Authentication in Node.js
  4. How to Implement Two-factor Authentication (2FA) in React.js

django_2fa_project's People

Contributors

wpcodevo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.