https://github.com/csmqbusy/fastapi-auth-template
FastAPI application template with authentication
https://github.com/csmqbusy/fastapi-auth-template
alembic docker fastapi mypy pydantic pytest python sqlalchemy
Last synced: about 2 months ago
JSON representation
FastAPI application template with authentication
- Host: GitHub
- URL: https://github.com/csmqbusy/fastapi-auth-template
- Owner: csmqbusy
- Created: 2025-02-05T10:45:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-07T17:54:54.000Z (over 1 year ago)
- Last Synced: 2025-07-04T20:48:00.132Z (12 months ago)
- Topics: alembic, docker, fastapi, mypy, pydantic, pytest, python, sqlalchemy
- Language: Python
- Homepage:
- Size: 144 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Info
This is a version of the FastAPI application template (https://github.com/csmqbusy/fastapi-template)
with the implemented functionality of authentication using cookies and JWT (JSON Web Tokens).
### Usage
1. Clone project.
2. Install the uv package manager if it is not already installed
(https://docs.astral.sh/uv/getting-started/installation/).
3. Apply the `uv sync` command to install dependencies.
4. Rename `.env.dev.example` to `env.dev`
5. mkdir `certs` in the root folder.
6. Generate two pairs of secret keys (RSA256) in `certs` folder: `access_private.pem`, `access_public.pem`, `refresh_private.pem`, `refresh_public.pem`
7. Apply migrations by the `alembic upgrade head` command.
### Optional
To start the tests, you must run the docker-container (`docker compose up -d`) and create a database in it with the `example_db_test` name by default.