Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Two Factor Authentication (2FA) using FastAPI

NotificationsYou must be signed in to change notification settings

jpvinod/two-factor-auth-FastAPI

Repository files navigation

This repository usesFastAPI for creating webapp andPyOTP Python library is used for generating and verifying one-time passwords.

Installation

Local

git clone https://github.com/vinodiOS/two-factor-auth-FastAPI.gitcd two-factor-auth-FastAPIvirtualenv venvsource env/bin/activate pip install -r requirements.txtuvicorn main:app --reload

Container with docker

docker-compose up

Steps for setting up Two Factor Authentication

Follow next steps for setting up user account and generate TOTP using Authenticator app.

Signup

Enter the following path to create new user.

http://127.0.0.1:8000/signup/

signup

QR Code Generation

After entering appropriate details new user would be created and page will be navigated to QR Code.

qrcode_scan

Authenticator app setup

UseGoogle Authenticator orMicrosoft Authenticator or any other Authenticator app to scan QR code and generate TOTP.

otp_screenshot

Login

Follow this path to login

http://127.0.0.1:8000/login/

Enter user credentials along with 6 digit TOTP generated by Authenticator app.

login

And, welcome to your website. You have securely logged into your account.

welcome

Please star ✨ repository if you like it. Thank you!

About

Two Factor Authentication (2FA) using FastAPI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp