Simple Authentication API made in FastAPI
- [POST]
/users
- registers a new user - [POST]
/token
- retrieves an access token provided the credentials - [GET]
/user/me
- retrieves the current user (protected by authentication)
- Setup the virtual environment and install packages from
requirements.txt
pip install -r requirements.txt
- Copy
example.env
file and fill it out with correct values - Start the postgres database - for your convenience you can use
docker/docker-compose.yml
cd docker
docker-compose up -d
- Run migrations (do this only the first time)
alembic upgrade head
- Run the server
python -m uvicorn app.main:app --reload