https://github.com/pasan1/simple-fastapi-user-authentication
Simple FastAPI User Authentication without database
https://github.com/pasan1/simple-fastapi-user-authentication
api-authentication authenticate authentication fastapi python token user-authentication
Last synced: 10 months ago
JSON representation
Simple FastAPI User Authentication without database
- Host: GitHub
- URL: https://github.com/pasan1/simple-fastapi-user-authentication
- Owner: pasan1
- Created: 2023-06-30T19:27:23.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-30T19:36:34.000Z (over 2 years ago)
- Last Synced: 2025-02-05T18:06:48.494Z (12 months ago)
- Topics: api-authentication, authenticate, authentication, fastapi, python, token, user-authentication
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
- [Youtube](https://youtu.be/5GxQ1rLTwaU)
```
```