# OAuth providers

Source: https://www.pontive.com/docs/api-reference/management/oauth-providers

Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so).

Authentication: send `Authorization: Bearer <token>` with a secret key (`pontive_sk_…`, which implies its instance) or an access token issued for this API. A token that can reach several instances also names one with `X-Pontive-Instance-ID: inst_…`. Secret keys are for servers only.

## List OAuth providers

```http
GET https://api.{region}.pontive.com/v1/apps/{app_id}/auth-connections
```

List an app's configured OAuth providers merged with the catalog. The pagination block counts connected (stored) providers only; data additionally includes unconnected catalog entries, so the number of items may exceed limit.

Operation ID: `ListAuthConnections`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | "connected" \| "available" \| "all" |  | Filter: connected (stored configs only), available (unconnected catalog types only), or all (default) |
| `sort` | string |  | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, name, provider. Default: -created_at |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |

### Responses

- `200` OK: ListOAuthProvidersResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get OAuth provider

```http
GET https://api.{region}.pontive.com/v1/apps/{app_id}/auth-connections/{connection_slug}
```

Get an app's provider by slug. Returns the resolved view; an unconnected catalog provider is returned with connected=false and no config.

Operation ID: `GetAuthConnection`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |
| `connection_slug` | string | yes | Provider slug |

### Responses

- `200` OK: OAuthProvider
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete OAuth connection

```http
DELETE https://api.{region}.pontive.com/v1/apps/{app_id}/auth-connections/{connection_slug}
```

Delete an app's OAuth connection by provider slug. This also drops all stored user OAuth credentials for that provider on this app; users must re-connect if it is recreated.

Operation ID: `DeleteAuthConnection`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |
| `connection_slug` | string | yes | Provider slug |

### Responses

- `204` No Content
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Upsert OAuth connection

```http
PUT https://api.{region}.pontive.com/v1/apps/{app_id}/auth-connections/{connection_slug}
```

Create or update an app's OAuth connection for the provider slug (unique per app). If no connection exists yet it is created (201); otherwise it is updated (200). Omitted fields are left unchanged on update, and an omitted secret leaves the stored secret intact. Secrets are accepted here but never returned; responses expose only *_set booleans.

Operation ID: `ReplaceAuthConnection`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |
| `connection_slug` | string | yes | Provider slug |

### Request body (`application/json`, required): CreateOAuthConnectionRequest

OAuth connection payload

### Responses

- `200` OK: OAuthConnection
- `201` Created: OAuthConnection
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Includes instance_unclaimed: a generic OIDC connection (provider_type oidc) on an unclaimed instance; claim it first (pontive-spec 47): ErrResponse
- `500` Internal Server Error: ErrResponse

## List provider catalog

```http
GET https://api.{region}.pontive.com/v1/authn/connection-types
```

List the platform's supported OAuth provider types and their metadata (scopes, Pontive Credentials availability, deprecation), independent of any app. Carries no credentials. The list is unpaginated.

Operation ID: `ListAuthConnectionTypes`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page, 1 to 100 |

### Responses

- `200` OK: ListProviderCatalogResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Schemas

### ListOAuthProvidersResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | OAuthProviderListItem[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ErrResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | ErrBody |  |  |

### OAuthProvider

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string |  |  |
| `callback_urls` | string[] |  | CallbackURLs are the redirect_uris this provider's login flow uses — one per auth-server domain the project serves. Register every one in the provider's own console or logins on an unregistered domain fail with redirect_uri_mismatch. They are an auth-server property, identical for every provider and set even before one is connected. |
| `config` | GoogleConfigView \| LinkedInConfigView \| MicrosoftConfigView \| EntraConfigView \| OIDCConfigView \| GitHubConfigView \| AppleConfigView |  |  |
| `connect_scopes` | string[] |  | ConnectScopes are requested in this app's connect (connected-accounts) flow. |
| `connected` | boolean |  |  |
| `created_at` | string |  |  |
| `credential_source` | "own" \| "shared" \| "pontive" |  | CredentialSource selects where the client credentials come from: 'own' (in config), 'shared' (shared_credential_id), or 'pontive' (Pontive Credentials). |
| `deprecated` | boolean |  |  |
| `multi_instance` | boolean |  |  |
| `name` | string |  |  |
| `object` | string |  |  |
| `pontive_credentials_available` | boolean |  |  |
| `provider` | string |  |  |
| `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" |  |  |
| `required_scopes` | string[] |  |  |
| `scope_descriptions` | Record<string, string> |  |  |
| `shared_credential_id` | string |  |  |
| `signin_scopes` | string[] |  | SigninScopes are the identity scopes requested at sign-in, on top of the provider type's catalog-required scopes. |
| `update_user_profile` | boolean |  |  |
| `updated_at` | string |  |  |
| `use_for_signin` | boolean |  | UseForSignin reports whether this connection may serve as a sign-in method. |

### CreateOAuthConnectionRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | GoogleConfig \| LinkedInConfig \| MicrosoftConfig \| EntraConfig \| OIDCConfig \| GitHubConfig \| AppleConfig |  |  |
| `connect_scopes` | string[] |  | ConnectScopes are requested in this app's connect (connected-accounts) flow. |
| `credential_source` | "own" \| "shared" \| "pontive" |  | CredentialSource selects where the client credentials come from: 'own' (in config, the default), 'shared' (shared_credential_id), or 'pontive' (Pontive Credentials). Config is required only for 'own'. |
| `name` | string |  |  |
| `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" | yes |  |
| `shared_credential_id` | string |  |  |
| `signin_scopes` | string[] |  | SigninScopes are the identity scopes requested at sign-in, on top of the provider type's catalog-required scopes. |
| `update_user_profile` | boolean |  |  |
| `use_for_signin` | boolean |  | UseForSignin allows this connection to serve as a sign-in method. |

### OAuthConnection

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string |  |  |
| `config` | GoogleConfigView \| LinkedInConfigView \| MicrosoftConfigView \| EntraConfigView \| OIDCConfigView \| GitHubConfigView \| AppleConfigView |  |  |
| `connect_scopes` | string[] |  | ConnectScopes are requested in this app's connect (connected-accounts) flow. |
| `created_at` | string |  |  |
| `credential_source` | "own" \| "shared" \| "pontive" |  | CredentialSource selects where the client credentials come from: 'own' (in config), 'shared' (shared_credential_id), or 'pontive' (Pontive Credentials). |
| `instance_id` | string |  |  |
| `name` | string |  |  |
| `object` | string |  |  |
| `provider` | string |  |  |
| `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" |  |  |
| `shared_credential_id` | string |  |  |
| `signin_scopes` | string[] |  | SigninScopes are the identity scopes requested at sign-in, on top of the provider type's catalog-required scopes. |
| `update_user_profile` | boolean |  |  |
| `updated_at` | string |  |  |
| `use_for_signin` | boolean |  | UseForSignin reports whether this connection may serve as a sign-in method. |

### ListProviderCatalogResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | ProviderCatalogEntry[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### OAuthProviderListItem

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string |  |  |
| `connect_scopes` | string[] |  |  |
| `connected` | boolean |  |  |
| `created_at` | string |  |  |
| `credential_source` | "own" \| "shared" \| "pontive" |  | CredentialSource: 'own' \| 'shared' \| 'pontive'. |
| `deprecated` | boolean |  |  |
| `multi_instance` | boolean |  |  |
| `name` | string |  |  |
| `object` | string |  |  |
| `pontive_credentials_available` | boolean |  |  |
| `provider` | string |  |  |
| `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" |  |  |
| `required_scopes` | string[] |  |  |
| `scope_descriptions` | Record<string, string> |  |  |
| `shared_credential_id` | string |  |  |
| `signin_scopes` | string[] |  |  |
| `update_user_profile` | boolean |  |  |
| `updated_at` | string |  |  |
| `use_for_signin` | boolean |  |  |

### Pagination

Pagination is the page answered (api-route-review D9).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer |  | Limit is the maximum number of items per page. |
| `page` | integer |  | Page is the 1-based index of the returned page. |
| `total` | integer |  | Total is the total number of items across all pages. |
| `total_pages` | integer |  | TotalPages is the total number of pages available. |

### ErrBody

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string |  | Code is the spec's machine-readable code for this error, in snake case: a domain code such as seat_limit_reached where the refusal has one, otherwise a generic one such as permission_denied, not_found, conflict, invalid_request or service_unavailable. |
| `details` | ErrDetail[] |  | Details are per-field findings, present only on a refusal that has them, e.g. a 422 invalid_theme names each invalid value by its path, a 422 package_invalid each problem, and a 409 capability_in_use each count by its name. |
| `doc_url` | string |  | DocURL links to documentation about this error, when available. |
| `message` | string |  | Message is a human-readable description of what went wrong. |
| `object` | string |  | Object is the discriminator; always "error". |
| `param` | string |  | Param names the request parameter this error refers to, when applicable. |
| `type` | "validation_error" \| "authentication_error" \| "authorization_error" \| "not_found" \| "conflict_error" \| "rate_limit_error" \| "internal_error" |  | Type is the error's category, set by its HTTP status: one of validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error, internal_error. |

### GoogleConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |

### LinkedInConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |

### MicrosoftConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |

### EntraConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |
| `tenant_id` | string |  |  |

### OIDCConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additional_authorization_params` | Record<string, string> |  |  |
| `attributes_mapping` | AttributesMapping |  |  |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |
| `display` | string |  |  |
| `endpoints` | Endpoints |  |  |
| `prompt` | string[] |  |  |
| `use_pkce` | boolean |  | UsePKCE is absent when the instance never set it explicitly, which leaves PKCE off for the generic "oidc" type. |

### GitHubConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |
| `prompt` | string[] |  |  |

### AppleConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_secret_set` | boolean |  |  |
| `key_id` | string |  |  |
| `private_key_set` | boolean |  |  |
| `service_id` | string |  |  |
| `team_id` | string |  |  |

### GoogleConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### LinkedInConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### MicrosoftConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### EntraConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `tenant_id` | string |  | TenantID is the Entra tenant substituted into the {tenant} segment of the provider's authority endpoints. Unlike Microsoft's fixed "common" authority, an Entra connection is pinned to this single tenant. |

### OIDCConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additional_authorization_params` | Record<string, string> |  |  |
| `attributes_mapping` | AttributesMapping |  |  |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `display` | "page" \| "popup" \| "touch" \| "wap" |  |  |
| `endpoints` | Endpoints |  |  |
| `prompt` | "none" \| "login" \| "consent" \| "select_account"[] |  |  |
| `use_pkce` | boolean |  | UsePKCE omitted leaves PKCE off: the generic "oidc" type is user-configured end to end and has no catalog default to inherit. An explicit value is never overridden — a false survives even where a provider default is true. |

### GitHubConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `prompt` | "none" \| "login" \| "consent" \| "select_account"[] |  |  |

### AppleConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_secret` | string |  | ClientSecret is a pre-generated Apple client-secret JWT. Supplying it short-circuits derivation, making private_key/team_id/key_id unnecessary. |
| `key_id` | string |  |  |
| `private_key` | string |  | PrivateKey is the .p8 key material Apple's client secret is derived from. Required unless client_secret is supplied. |
| `service_id` | string |  |  |
| `team_id` | string |  |  |

### ProviderCatalogEntry

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `deprecated` | boolean |  |  |
| `multi_instance` | boolean |  |  |
| `object` | string |  |  |
| `pontive_credentials_available` | boolean |  |  |
| `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" |  |  |
| `required_scopes` | string[] |  |  |
| `scope_descriptions` | Record<string, string> |  |  |

### ErrDetail

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `field` | string |  | Field is where the finding is: for a theme, its dotted path. |
| `message` | string |  | Message is what is wrong there. |

### AttributesMapping

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | string |  |  |
| `birthdate` | string |  |  |
| `email` | string |  |  |
| `email_verified` | string |  |  |
| `family_name` | string |  |  |
| `gender` | string |  |  |
| `given_name` | string |  |  |
| `locale` | string |  |  |
| `middle_name` | string |  |  |
| `name` | string |  |  |
| `nickname` | string |  |  |
| `phone_number` | string |  |  |
| `phone_number_verified` | string |  |  |
| `picture` | string |  |  |
| `profile` | string |  |  |
| `sub` | string |  |  |
| `updated_at` | string |  |  |
| `website` | string |  |  |
| `zoneinfo` | string |  |  |

### Endpoints

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authorization_url` | string |  |  |
| `discovery_url` | string |  |  |
| `token_url` | string |  |  |
| `user_info_url` | string |  |  |
