~muirrum/gompei-verification

Link an OAuth account with a Discord account

81f954e meta: Add privacy policy

2 years ago

a2e61c5 web: Allow customization of listen port

2 years ago

#Gompei Verification

This is a small web service to allow students to verify their Azure AD accounts with a specific Discord account.

#Configuration

Create a .env file with the following keys:

  • AZURE_CLIENT_ID - the OAuth2 Client ID provided by Azure
  • AZURE_CLIENT_SECRET - the OAuth2 Client Secret provided by Azure
  • AZURE_TENANT_ID - the Azure AD tenant ID
  • DISCORD_CLIENT_ID - the OAuth2 Client ID provided by Discord
  • DISCORD_CLIENT_SECRET - the OAuth2 Client Secret provided by Discord
  • DISCORD_GUILD - the Discord server that contains the verification role
  • DISCORD_VERIFY_ROLE - the role to be granted upon successful verification
  • DISCORD_TOKEN - the Discord bot token
  • BASE_URL - the base public-facing URL, used to construct redirects
  • SUCCESS_URL - the URL to redirect to on success
  • LISTEN_PORT - the HTTP port to bind the web server to

#Setup

  1. Create an Azure "App Registration" in the Azure Portal.
  2. Create a Discord "Application" in the Discord portal.
  3. Fill in your .env file with the credentials and IDs needed
  4. go build && ./gompei-verification