Auth Server is a robust, production-ready authentication microservice built with Go and Gin. It provides a full OAuth 2.0 Provider implementation, MFA, and RBAC out of the box.
Note
This project is designed to be the backbone of your's app security. It's not just a boilerplate, but a feature-complete service that handles user lifecycles, OAuth flows, and administrative management.
Auth Server is built on a modular architecture using Clean Architecture principles in Go.
- High Performance: Optimized Gin routes and Redis caching.
- Security Hardened: CSP headers, CORS protection, and secure token rotation.
- Enterprise Ready: Full OAuth 2.0 Provider flow for 3rd party integrations.
- Interactive Documentation: Beautifully redesigned Swagger UI.
Important
You can directly explore the API using our hosted documentation:
Note
These features represent the current state of Auth Server. We are actively looking for contributors to expand these capabilities.
- JWT Core: Access & Refresh token rotation with secure revocation.
- OAuth 2.0 Provider: Complete Authorization Code flow for 1st & 3rd party apps.
- Multi-Factor Auth: TOTP support (Google Authenticator / Authy compatibility).
- Social Login: One-click sign-in with Google & GitHub.
- Role-Based Access: Granular
adminvsuserpermissions. - Audit Logging: Comprehensive tracking of security events.
- Rate Limiting: Redis-backed protection for all auth endpoints.
- Email flow: Verification, Password Reset, and Welcome emails.
- Docker Ready: Multi-stage builds and Compose orchestration.
- Webhooks: Notify external systems on auth events (Coming Soon).
- SAML Integration: Enterprise SSO support (Open for Contribution).
- SDKs: Official Client SDKs for React, Flutter, and Go.
- Language: Go 1.25+
- Framework: Gin Gonic
- ORM: GORM (PostgreSQL Driver)
- Cache/Session: Redis (Rate limiting & Token blacklist)
- Hashing: BCrypt
- Auth Protocols: OAuth 2.0, OpenID Connect (Partial), TOTP
- Transport: TLS-ready, CSP & Security Headers
- Go 1.25+
- Docker & Docker Compose
- PostgreSQL 15+ & Redis 7+
# Clone the repository
git clone https://github.com/roshankumar0036singh/auth-server.git
cd auth-server
# Install dependencies
go mod download
# Set up environment
cp .env.example .envdocker compose up --build -dAccess the server at http://localhost:8080 and docs at /swagger/.
Important
We thrive on community contributions. Whether it's fixing a bug, improving docs, or proposing a new feature, your help is welcome!
- π¬ Discord Server β Join our community
- π§ GitHub Discussions β Share ideas
- Fork the project.
- Branch off (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'feat: add some amazing feature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a PR!
Distributed under the MIT License. See LICENSE for more information.
Roshan Kumar Singh - @roshankumar0036singh
