Hosted Auth Context
GET /api/auth/context returns public organization and service metadata for hosted login surfaces before a user authenticates.
Query parameters
| Parameter | Type | Description |
|---|---|---|
org |
string |
Optional organization slug |
service |
string |
Optional service slug |
redirect_uri |
string |
Optional candidate callback URI to validate |
Example
curl "https://sso.example.com/api/auth/context?org=acme-corp&service=main-app&redirect_uri=https://app.acme.com/callback"
Response
{
"organization": {
"slug": "acme-corp",
"name": "Acme Corp",
"logo_url": "https://cdn.example.com/logo.svg",
"primary_color": "#0f766e",
"status": "active"
},
"service": {
"slug": "main-app",
"name": "Main App",
"service_type": "web",
"redirect_uri_valid": true
},
"available_providers": ["github", "google"],
"auth_methods": ["password", "magic_link", "passkey"],
"support_available": true
}
Notes
- If
orgis omitted, the endpoint returns platform-level defaults. - If the organization is not active,
available_providersandauth_methodsare emptied. redirect_uri_validis only returned when bothserviceandredirect_uriare provided.