Skip to content

UT-BT/auth

Repository files navigation

UTBT Auth

Auth Release

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.

Features

  • 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:

  1. Login on their browser, maintaining their logged in status throughout all of the *.utbt.net sphere
  2. Login on our UT99 game servers, having their registered HWID stored in the DB for player validation
  3. Login through our API and access UTBT data

Prerequisites

  • Go 1.23 or higher
  • Supabase account
  • Discord Developer account and application

Quick Start

For detailed installation and setup instructions, please refer to the CONTRIBUTING.md file.

  1. Clone the repository:
git clone https://github.com/UT-BT/auth.git
cd auth
  1. Run the bootstrap script to set up your development environment:

Windows

.\scripts\bootstrap.bat

Unix/Linux/macOS

./scripts/bootstrap

Dependencies

Contributing

Please read CONTRIBUTING.md for details on our development workflow, coding standards, and how to submit pull requests.

License

This project is licensed under the terms found in the LICENSE file.

About

Provides authentication and authorization for UTBT

Resources

License

Contributing

Stars

Watchers

Forks

Contributors