Skip to main content

Social Providers

GET /orgs/{orgId}/api/v1/admin/social-providers
GET /orgs/{orgId}/api/v1/admin/social-providers/available
GET /orgs/{orgId}/api/v1/admin/social-providers/types
GET /orgs/{orgId}/api/v1/admin/social-providers/callback-urls
GET /orgs/{orgId}/api/v1/admin/social-providers/{providerId}
PUT /orgs/{orgId}/api/v1/admin/social-providers/{providerId}
PATCH /orgs/{orgId}/api/v1/admin/social-providers/{providerId}
DELETE /orgs/{orgId}/api/v1/admin/social-providers/{providerId}
POST /orgs/{orgId}/api/v1/admin/social-providers/{providerId}/enable
POST /orgs/{orgId}/api/v1/admin/social-providers/{providerId}/disable
POST /orgs/{orgId}/api/v1/admin/social-providers

Social providers allow users to sign in using their existing accounts from services like Google, GitHub, or Microsoft. The OAuth flow uses:

GET /orgs/{orgId}/api/v1/oauth/social/{provider}

Authentication​

All social provider management endpoints require an admin API key or a Bearer token with admin:social:read / admin:social:write.

Each endpoint needs the credential's scope and a permission. A session or Bearer caller must hold the permission; for an API key its creator must still hold it. A missing permission returns 403 forbidden with details.required_permissions. See Required permissions.

MethodEndpointPermissionAPI-key / token scope
GET/admin/social-providersidps.viewadmin:social:read
GET/admin/social-providers/availableidps.viewadmin:social:read
GET/admin/social-providers/typesidps.viewadmin:social:read
GET/admin/social-providers/callback-urlsidps.viewadmin:social:read
GET/admin/social-providers/{providerId}idps.viewadmin:social:read
POST/admin/social-providersidps.createadmin:social:write
PUT PATCH/admin/social-providers/{providerId}idps.editadmin:social:write
DELETE/admin/social-providers/{providerId}idps.deleteadmin:social:write
POST/admin/social-providers/{providerId}/enableidps.editadmin:social:write
POST/admin/social-providers/{providerId}/disableidps.editadmin:social:write

Social Provider Object​

Social Provider Object
{
"id": "01JF3KSP...",
"provider": "google",
"displayName": "Google",
"clientId": "123456789.apps.googleusercontent.com",
"enabled": true,
"requestedScopes": ["openid", "profile", "email"],
"callbackUrl": "https://app.lumoauth.dev/orgs/acme-corp/auth/social/google/callback",
"defaultRoles": ["member"],
"createdAt": "2026-01-15T10:30:00Z"
}
note

clientSecret is write-only and will never be returned in responses.

callbackUrl is read-only. LumoAuth generates it (https://{host}/orgs/{orgId}/auth/social/{provider}/callback); a callbackUrl sent on create, PUT or PATCH is ignored. Rows that still held the old https://your-domain.com/... placeholder are returned with the generated URL.

defaultRoles​

defaultRoles is a list of role slugs granted to every account the provider provisions on first sign-in. It is a role-assignment sink, so the no privilege gain rule applies on POST, PUT and PATCH:

  • System roles and roles that confer administrator authority (users.create, roles.edit, idps.create, settings.manage, jit.approve, and the other families listed in the roles guide) are refused.
  • The caller must hold every permission in each role. With an API key, the key's creator is the caller.
  • Unknown slugs are ignored; a refused role fails the whole request and nothing is written.
400 Bad Request
{
"error": "invalid_request",
"message": "defaultRoles: role \"tenant-admin\" is a system or administrative role and cannot be a social-login default role",
"status": 400
}
400 Bad Request
{
"error": "invalid_request",
"message": "defaultRoles: Cannot assign role \"editor\": it contains permissions you do not hold.",
"status": 400
}

List Configured Providers​

List Configured Providers
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers" \
-H "Authorization: ApiKey lmk_abc123"

List Available Provider Types​

Returns the full list of supported providers and their required configuration fields. GET /social-providers/types is an alias of this endpoint and returns the same payload.

Get Available Provider Types
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers/available" \
-H "Authorization: ApiKey lmk_abc123"
Available Providers
{
"data": [
{
"provider": "google",
"name": "Google",
"requiredFields": ["clientId", "clientSecret"],
"optionalFields": ["hostedDomain"],
"defaultScopes": ["openid", "profile", "email"]
},
{
"provider": "github",
"name": "GitHub",
"requiredFields": ["clientId", "clientSecret"],
"optionalFields": [],
"defaultScopes": ["user:email", "read:user"]
},
{
"provider": "microsoft",
"name": "Microsoft",
"requiredFields": ["clientId", "clientSecret"],
"optionalFields": ["tenantId"],
"defaultScopes": ["openid", "profile", "email"]
}
]
}

Get Callback URLs​

Before configuring a provider, retrieve the callback URL to register in your IdP's app settings:

Get Callback URLs
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers/callback-urls" \
-H "Authorization: ApiKey lmk_abc123"

Configure a Provider (Upsert)​

PUT is an upsert: it creates the provider if it does not exist, or fully replaces the configuration if it does. clientId is required for both create and update via PUT.

Configure Google (PUT upsert)
curl -X PUT https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers/google \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{
"clientId": "123456789.apps.googleusercontent.com",
"clientSecret": "GOCSPX-...",
"enabled": true,
"requestedScopes": ["openid", "profile", "email"]
}'

Returns 201 Created on creation, 200 OK on update.

Partial Update (PATCH)
curl -X PATCH https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers/google \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'

Enable / Disable a Provider​

Enable a Provider
curl -X POST https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers/google/enable \
-H "Authorization: ApiKey lmk_abc123"
Disable a Provider
curl -X POST https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers/google/disable \
-H "Authorization: ApiKey lmk_abc123"

Create a Provider via POST​

Create via POST
curl -X POST https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{
"provider": "github",
"displayName": "GitHub",
"clientId": "Ov23li...",
"clientSecret": "abc123...",
"enabled": true
}'

Delete a Provider​

Delete a Provider
curl -X DELETE "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/social-providers/google" \
-H "Authorization: ApiKey lmk_abc123"

Initiate Social Login Flow​

Users sign in via social providers using the OAuth flow:

GET /orgs/{orgId}/api/v1/oauth/social/{provider}?client_id=...&redirect_uri=...

client_id is your LumoAuth OAuth client and redirect_uri one of its registered redirect URIs. After authentication with the social provider, LumoAuth links the identity to the user's account and completes the OAuth flow. The simpler route is to send the provider hint on the authorization endpoint, which does the same within a normal authorization request.

Supported Providers​

ProviderproviderIdRequired Fields
GooglegoogleclientId, clientSecret
GitHubgithubclientId, clientSecret
MicrosoftmicrosoftclientId, clientSecret
AppleappleclientId, teamId, keyId, privateKey
FacebookfacebookclientId, clientSecret
LinkedInlinkedinclientId, clientSecret
Generic OIDCoidcclientId, clientSecret, issuerUrl