OAuth Setup
TrocOS supports sign-in with GitHub, Discord, and Slack in addition to email and password. OAuth buttons only appear when the corresponding environment variables are set — the app works fine with email/password only.
How it works
OAuth credentials are passed as environment variables. Set only the providers you want to enable; leave the others unset.
The callback URL pattern for all providers is:
https://your-domain.com/auth/PROVIDER/callbackWhere PROVIDER is github, discord, or slack.
GitHub
1. Create a GitHub OAuth App
Go to GitHub → Settings → Developer settings → OAuth Apps → New OAuth App.
Fill in:
- Application name: TrocOS (or your community name)
- Homepage URL:
https://your-domain.com - Authorization callback URL:
https://your-domain.com/auth/github/callback
Save your Client ID and Client Secret.
2. Set environment variables
GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secretDiscord
1. Create a Discord Application
Go to the Discord Developer Portal and click New Application.
Under OAuth2 → Redirects, add:
https://your-domain.com/auth/discord/callbackNote your Client ID and Client Secret from the OAuth2 tab.
Required scopes: identify, email
2. Set environment variables
DISCORD_CLIENT_ID=your_client_id
DISCORD_CLIENT_SECRET=your_client_secretSlack
1. Create a Slack App
Go to api.slack.com/apps and click Create New App → From scratch.
Under OAuth & Permissions → Redirect URLs, add:
https://your-domain.com/auth/slack/callbackRequired scopes (under User Token Scopes): openid, email, profile
Save your Client ID and Client Secret.
2. Set environment variables
SLACK_CLIENT_ID=your_client_id
SLACK_CLIENT_SECRET=your_client_secretVerify
After restarting the app, the sign-in page will show OAuth buttons for each configured provider. If a provider's variables are missing, its button won't appear — this is intentional and safe.