Authentication service built with Go, providing Discord-based authentication and role-based access control (RBAC) for the UTBT platform. This service integrates with Supabase for user management and authentication.
- Discord Authentication: Login using Discord OAuth2
- Role-Based Access Control: Hierarchical role system with granular permissions
- Token Management: JWT token handling with refresh token support
- Cookie Management: HTTP-only cookie handling for authentication
- CORS Support: Configurable CORS policies for cross-origin requests
- Static File Serving: Built-in static file server for web assets
Leveraging Supabase and Discord OAuth2, this service allows players to:
- Login on their browser, maintaining their logged in status throughout all of the *.utbt.net sphere
- Login on our UT99 game servers, having their registered HWID stored in the DB for player validation
- Login through our API and access UTBT data
- Go 1.23 or higher
- Supabase account
- Discord Developer account and application
For detailed installation and setup instructions, please refer to the CONTRIBUTING.md file.
- Clone the repository:
git clone https://github.com/UT-BT/auth.git
cd auth- Run the bootstrap script to set up your development environment:
.\scripts\bootstrap.bat./scripts/bootstrap- chi - Lightweight HTTP router
- templ - HTML templating
- zerolog - Zero allocation JSON logger
- godotenv - Environment variable loader
- supabase-community/auth-go - Supabase Auth Go client
- go-chi/cors - CORS middleware
Please read CONTRIBUTING.md for details on our development workflow, coding standards, and how to submit pull requests.
This project is licensed under the terms found in the LICENSE file.