← 返回首页
GitHub - pasan1/Simple-FastAPI-User-Authentication: Simple FastAPI User Authentication without database · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

pasan1/Simple-FastAPI-User-Authentication

 master
Go to file
Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
View all files

Repository files navigation

More items

Authenticate Users with FastAPI and Token Authentication

Introduction

This is a simple project to demonstrate how to use FastAPI with OAuth2 and JWT.

Requirements

Create a virtual environment

python -m venv venv

Activate the virtual environment

source venv/bin/activate

Install the requirements

pip install fastapi pip install uvicorn[standard] pip install python-multipart pip install python-jose[cryptography] pip install passlib[bcrypt]

Generate a secret key

openssl rand -hex 32

Run the application

uvicorn main:app --reload

Test the application

http://localhost:8000/docs

References

About

Simple FastAPI User Authentication without database

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Footer

© 2026 GitHub, Inc.