configuration
GitHub OAuth
Optional sign-in with GitHub. Separate from connecting personal accounts.
Glyph supports two unrelated GitHub integrations:
- GitHub OAuth login - users sign into Glyph itself with their GitHub account
- Connected GitHub accounts (PAT) - users connect one or more GitHub accounts to import private repositories
This page covers the first. For the second, see Connecting Accounts.
OAuth login is optional. Without it, users sign in with email + password.
Why enable OAuth login?
- Faster onboarding for teams already using GitHub
- One fewer password to remember
- Familiar SSO-like experience
The downside: every user needs a GitHub account, which may not suit closed teams or external collaborators.
Creating the OAuth App
- Go to github.com/settings/developers.
- Click OAuth Apps → New OAuth App.
- Fill in:
- Application name:
Glyph(or anything) - Homepage URL:
http://localhost:3000(yourFRONTEND_URL) - Authorization callback URL:
http://localhost:8000/api/auth/github/callback(yourAPP_URL+/api/auth/github/callback)
- Application name:
- Click Register application.
- Copy the Client ID.
- Click Generate a new client secret and copy the secret immediately (it's shown once).
Configuring Glyph
In your .env:
GITHUB_CLIENT_ID=<your client id>
GITHUB_CLIENT_SECRET=<your client secret>Restart the backend:
docker compose restart backendThe login page now shows a Sign in with GitHub button.
How sign-in works
- User clicks Sign in with GitHub.
- Browser is redirected to GitHub for consent.
- GitHub redirects back to
APP_URL/api/auth/github/callback?code=.... - Backend exchanges the code for an access token, fetches the user's GitHub profile, and creates or matches a Glyph user record by email.
- Backend issues a JWT and redirects to the frontend.
The OAuth access token from this flow is used only for authentication - it's not stored. To import private repositories, the user still needs to add a Personal Access Token.
Production callback URL
When deploying behind a reverse proxy, update both:
- The OAuth App's callback URL on github.com (e.g.
https://api.glyph.example.com/api/auth/github/callback) APP_URLin.env(e.g.https://api.glyph.example.com)
The two must match exactly - including scheme, host, port, and path. A common gotcha is mismatched trailing slashes.
The OAuth Client Secret is sensitive. Don't commit it to Git, don't share it in chat. If leaked, regenerate it on github.com immediately.
Disabling OAuth
To disable, leave GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET empty (or comment them out). The login page hides the GitHub button automatically.