Skip to content

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.

License

Notifications You must be signed in to change notification settings

roshankumar0036singh/auth-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Hey <πšŒπš˜πšπšŽπš›πšœ/>! πŸ‘‹

Typing SVG

Auth Server Banner

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.

πŸ“– About Auth Server

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.

⚑ Feature Highlights

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:


✨ Features Checklist

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 admin vs user permissions.
  • 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.

πŸ› οΈ Tech Stack

Backend Infrastructure

  • Language: Go 1.25+
  • Framework: Gin Gonic
  • ORM: GORM (PostgreSQL Driver)
  • Cache/Session: Redis (Rate limiting & Token blacklist)

Security Features

  • Hashing: BCrypt
  • Auth Protocols: OAuth 2.0, OpenID Connect (Partial), TOTP
  • Transport: TLS-ready, CSP & Security Headers

πŸš€ Getting Started

Prerequisites

  • Go 1.25+
  • Docker & Docker Compose
  • PostgreSQL 15+ & Redis 7+

Installation

# 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 .env

Running with Docker (Quickest)

docker compose up --build -d

Access the server at http://localhost:8080 and docs at /swagger/.


🀝 Contributing & Community

Important

We thrive on community contributions. Whether it's fixing a bug, improving docs, or proposing a new feature, your help is welcome!

Join the Discussion

How to Contribute

  1. Fork the project.
  2. Branch off (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'feat: add some amazing feature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a PR!

πŸ“„ License & Author

Distributed under the MIT License. See LICENSE for more information.

Roshan Kumar Singh - @roshankumar0036singh

About

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.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Languages