Administrator Social Login / OAuth Integration API
This page documents administrator configuration. Customer sign-in availability is described in the product integration guide.
Base URL: http://localhost:8000/api/v1
Prefix: /admins/platform-settings/integrations
Auth: Administrator JWT required
Headers: Content-Type: application/json
1. Get OAuth Configuration
Retrieve the saved integration state and sanitized configuration.
/admins/platform-settings/integrations/oauth/Auth: Required
Headers
Authorization: Bearer {{admin_access_token}}
Content-Type: application/jsonSuccess Example
{
"success": true,
"message": "Integration retrieved successfully.",
"data": {
"integration": {
"type": "oauth",
"is_enabled": true,
"configured": true,
"config": {
"google_enabled": true,
"google_client_id": "replace-with-client-id",
"facebook_enabled": false,
"apple_enabled": false,
"has_google_client_secret": true,
"has_facebook_app_secret": false,
"has_apple_private_key": false
},
"updated_at": "2026-11-24T10:00:00Z"
}
}
}Notes
Sensitive values are returned as has_* flags. configured means encrypted configuration exists; it does not verify provider credentials. A missing integration record is created disabled.
Applicable errors: 401 missing/invalid JWT; 403 administrator access required; 406 unsupported response format.
Unauthorized - HTTP 401
{
"success": false,
"message": "Authentication credentials were not provided.",
"errors": {}
}Forbidden - HTTP 403
{
"success": false,
"message": "You do not have permission to perform this action.",
"errors": {}
}2. Update OAuth Configuration
Save provider configuration and optionally enable or disable the integration.
/admins/platform-settings/integrations/oauth/Auth: Required
Headers
Authorization: Bearer {{admin_access_token}}
Content-Type: application/jsonRequest Body
| Field | Type | Requirement |
|---|---|---|
is_enabled | boolean | Optional; preserves the saved state when omitted. |
config | object | Optional; merges the submitted fields with saved configuration. |
{
"is_enabled": true,
"config": {
"google_enabled": true,
"google_client_id": "replace-with-client-id",
"google_client_secret": "replace-with-client-secret",
"facebook_enabled": false,
"apple_enabled": false
}
}{
"is_enabled": true,
"config": {
"google_enabled": false,
"facebook_enabled": true,
"facebook_app_id": "replace-with-app-id",
"facebook_app_secret": "replace-with-app-secret",
"facebook_api_version": "v23.0",
"apple_enabled": false
}
}Apple
{
"is_enabled": true,
"config": {
"google_enabled": false,
"facebook_enabled": false,
"apple_enabled": true,
"apple_client_id": "replace-with-client-id",
"apple_team_id": "replace-with-team-id",
"apple_key_id": "replace-with-key-id",
"apple_private_key": "-----BEGIN PRIVATE KEY-----\nreplace-with-private-key\n-----END PRIVATE KEY-----"
}
}Success Example
{
"success": true,
"message": "Integration updated successfully.",
"data": {
"integration": {
"type": "oauth",
"is_enabled": true,
"configured": true,
"config": {
"google_enabled": true,
"google_client_id": "replace-with-client-id",
"facebook_enabled": false,
"apple_enabled": false,
"has_google_client_secret": true,
"has_facebook_app_secret": false,
"has_apple_private_key": false
},
"updated_at": "2026-11-24T10:00:00Z"
}
}
}Notes
Both is_enabled and config are optional. PATCH merges with saved configuration; omit unchanged secrets to retain them. Required values must exist in the merged configuration when enabled. Saving does not verify provider connectivity. Disable with { "is_enabled": false }; re-enable with { "is_enabled": true } when configuration is complete.
Enable at least one of google_enabled, facebook_enabled, apple_enabled and supply its credentials. Multiple OAuth providers may be enabled together. facebook_api_version must match v<number>.<number>. Encode PEM newlines as \n in raw JSON.
Required fields when enabled
| Provider | Required fields |
|---|---|
google | google_client_id, google_client_secret |
facebook | facebook_app_id, facebook_app_secret |
apple | apple_client_id, apple_team_id, apple_key_id, apple_private_key |
Configuration fields
| Field | Type | Details |
|---|---|---|
google_enabled | boolean | Optional in a partial update |
google_client_id | string | Maximum length: 255; blank allowed |
google_client_secret | string | Maximum length: 255; blank allowed; write-only |
facebook_enabled | boolean | Optional in a partial update |
facebook_app_id | string | Maximum length: 255; blank allowed |
facebook_app_secret | string | Maximum length: 255; blank allowed; write-only |
facebook_api_version | Regex | blank allowed; Maximum length: 20 |
apple_enabled | boolean | Optional in a partial update |
apple_client_id | string | Maximum length: 255; blank allowed |
apple_team_id | string | Maximum length: 255; blank allowed |
apple_key_id | string | Maximum length: 255; blank allowed |
apple_private_key | string | blank allowed; write-only |
Disable without deleting configuration
{
"is_enabled": false
}Re-enable with complete saved configuration
{
"is_enabled": true
}No OAuth provider enabled - HTTP 400
{
"success": false,
"message": "Validation failed.",
"errors": {
"config": "Enable at least one OAuth provider."
}
}Applicable errors: 400 invalid/missing configuration or malformed JSON; 401 missing/invalid JWT; 403 administrator access required; 406 unsupported response format; 415 unsupported content type.
Unauthorized - HTTP 401
{
"success": false,
"message": "Authentication credentials were not provided.",
"errors": {}
}Forbidden - HTTP 403
{
"success": false,
"message": "You do not have permission to perform this action.",
"errors": {}
}