Skip to content

fabiocax/FastAuth2

Repository files navigation

FastAPI Users

FastAPI Users


Add quickly a registration and authentication system to your project. FastAuth2 is designed to be as customizable and adaptable as possible.

Features

  • Extensible base user model
  • Ready-to-use register, login, reset password and verify e-mail routes
  • Ready-to-use social OAuth2 login flow
  • Dependency callables to inject current user in route
  • Pluggable password validation
  • Customizable database backend
  • Multiple customizable authentication backends
    • Transports: Authorization header, Cookie
    • Strategies: JWT, Database, Redis
  • Full OpenAPI schema support, even with several authentication backends

Development

Setup environment

You should create a virtual environment and activate it:

python -m venv venv/
source venv/bin/activate

Clone project:

https://github.com/fabiocax/FastAuth2.git

Install dependencies:

pip install -r requirements.txt

Configure variables:

SECRET_KEY="{openssl rand -hex 32}"
API_DATABASE_URL="database url"

Docker Pull

docker pull shotofw/fastauth2

Create superuser

 docker run -p 5000:5000 -v /home/path/:/app/db -it shotofw/fastauth2  python cli.py createsuperuser admin senha

Api Docs

http://127.0.0.1:5000/docs#/

License

This project is licensed under the terms of the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages