Hosted Auth Context

Public hosted-auth metadata for login UIs.

Updated May 10, 2026 Edit this page

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 org is omitted, the endpoint returns platform-level defaults.
  • If the organization is not active, available_providers and auth_methods are emptied.
  • redirect_uri_valid is only returned when both service and redirect_uri are provided.