OpenAuth-Service is a simple and scalable authentication microservice built with FastAPI.
It is designed to be reusable, database-independent, and easy to integrate into modern backend systems.
This project provides a central authentication service for applications.
It focuses on clean structure, JWT-based authentication, and production-ready setup.
- JWT based authentication
- Refresh token support
- Clean and modular architecture
- Database independent (PostgreSQL, SQLite, etc.)
- FastAPI powered REST API
- Docker support
- Easy to extend and maintain
- Python 3.10+
- FastAPI
- SQLAlchemy
- PostgreSQL / SQLite
- Docker
Make sure you have the following installed:
- Python 3.10 or higher
- Git
- Docker (optional)
git clone https://github.com/devberatzengin/OpenAuth-Service.git
cd OpenAuth-ServiceCreate a .env file based on .env.example:
cp .env.example .envUpdate the values according to your environment.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadThe service will run on:
http://localhost:8000
docker build -t openauth-service .
docker run -p 8000:8000 openauth-serviceor
docker compose up --buildSwagger UI is available at:
http://localhost:8000/docs
You can test all endpoints from this page.
To run tests:
pytestThe project follows a clean and layered structure to keep the code readable and testable.
- API layer
- Service layer
- Database layer
- Core configuration
Contributions are welcome.
Steps:
- Fork the repository
- Create a new branch
- Add your feature or fix
- Open a pull request
If you have questions or suggestions, feel free to open an issue.