BYOO OAuth Credentials
Configure custom OAuth credentials for GitHub, Google, and Microsoft authentication.
Overview
BYOO (Bring Your Own OAuth) allows organizations to use their own OAuth application credentials instead of the platform defaults.
Benefits:
- Custom branding on OAuth consent screens
- Control over OAuth scopes
- App-specific analytics
- Organization-specific callback URLs
Endpoints
| Method | Path | Description |
|---|---|---|
POST |
/api/organizations/:slug/oauth-credentials/:provider |
Set credentials |
GET |
/api/organizations/:slug/oauth-credentials/:provider |
Get credentials |
POST /api/organizations/:slug/oauth-credentials/:provider
Set OAuth credentials for a provider.
Synopsis
| Property | Value |
|---|---|
| Authentication | Required (JWT) |
| Authorization | Owner or Admin |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
slug |
string |
Organization slug |
provider |
string |
github, google, or microsoft |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
client_id |
string |
Yes | OAuth client ID |
client_secret |
string |
Yes | OAuth client secret |
Example Request
curl -X POST https://sso.example.com/api/organizations/acme-corp/oauth-credentials/github \
-H "Authorization: Bearer {jwt}" \
-H "Content-Type: application/json" \
-d '{
"client_id": "Iv1.abc123def456",
"client_secret": "secret_xyz789"
}'
Response (200 OK)
{
"provider": "github",
"client_id": "Iv1.abc123def456",
"configured": true,
"configured_at": "2025-01-15T10:30:00Z"
}
[!NOTE] Client secret is never returned in responses.
GET /api/organizations/:slug/oauth-credentials/:provider
Get OAuth configuration status for a provider.
Synopsis
| Property | Value |
|---|---|
| Authentication | Required (JWT) |
| Authorization | Organization Member |
Example Request
curl -X GET https://sso.example.com/api/organizations/acme-corp/oauth-credentials/github \
-H "Authorization: Bearer {jwt}"
Response - Configured (200 OK)
{
"provider": "github",
"client_id": "Iv1.abc123def456",
"configured": true,
"configured_at": "2025-01-15T10:30:00Z"
}
Response - Not Configured (200 OK)
{
"provider": "github",
"configured": false
}
Provider Setup Guides
GitHub
- Go to GitHub Developer Settings
- Click “New OAuth App”
- Set Authorization callback URL to:
https://sso.example.com/auth/github/callback - Copy Client ID and generate Client Secret
- Go to Google Cloud Console
- Create or select a project
- Enable OAuth consent screen
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
https://sso.example.com/auth/google/callback
Microsoft
- Go to Azure Portal App Registrations
- Register new application
- Add redirect URI:
https://sso.example.com/auth/microsoft/callback - Create client secret
Fallback Behavior
| Scenario | Behavior |
|---|---|
| BYOO configured | Uses organization credentials |
| BYOO not configured | Falls back to platform credentials |
| Platform credentials missing | OAuth provider unavailable |