Auth API reference

Auth API · Apps

put/v1/apps/{app_id}/auth-config/providers/{provider}Auth

Write or replace the config for an (app, provider). Validates the body via the provider impl's `parseConfig` before encrypting; malformed config 400s. Default `enabled=false`.

Path parameters

app_id*string

Id of the app.

provider*string

The sign-in provider: `apple`, `google`, `github`, `microsoft`, or `oidc-<key>` for an OpenID Connect provider you added (the key is 1 to 32 lowercase letters, digits or hyphens that you choose, for example `oidc-okta`).

Request body

config*object

Provider-specific raw config blob. Shape is validated by the provider impl's `parseConfig`. For Apple: { service_id, bundle_ids: string[], team_id, key_id, private_key_pem }. For Google: { web_client_id, web_client_secret, native_client_ids?, hosted_domains? }. For GitHub: { client_id, client_secret, allowed_email_domains? }. For Microsoft: { client_id, client_secret, tenant? (`common` default, `organizations`, `consumers`, a directory id or a verified domain), allowed_tenant_ids?: string[], native_client_ids?: string[] }. For an OpenID Connect provider (`oidc-<key>`): { display_name, issuer (https), client_id, client_secret, scopes? (default `openid email profile`, must include `openid`), claim_mapping? { sub, email, email_verified, name, picture }, trust_email_verified? (default true), token_endpoint_auth_method? (`client_secret_basic` default or `client_secret_post`) }. Secrets are write-only.

enabledboolean

Whether this provider is live on the sign-in surface. Default false — write the config first, flip to true once you have verified end-to-end in a test app.

Response · 200

provider*string

The sign-in provider: `apple`, `google`, `github`, `microsoft`, or `oidc-<key>` for an OpenID Connect provider you added (the key is 1 to 32 lowercase letters, digits or hyphens that you choose, for example `oidc-okta`).

Example: "google"

enabled*boolean

Whether the provider is enabled.

config*object

Customer-safe view of the stored config. Public identifiers and metadata only — secrets (Apple private key, Google client secret, …) NEVER appear in the response. `private_key_present: true` is the only acknowledgement that a key is on file.

last_check_at*string · date-time

When the credential check last ran. Null until it has run for the saved credentials.

last_check_result*object

Result of the last credential check (run on every save and on `POST …/{provider}/check`). `credentials_valid`: the provider recognised the client id and secret (it only refused the dummy sign-in code we sent). `credentials_rejected`: the provider does not accept the client id or secret; sign-in with this provider is blocked until they are fixed. `inconclusive`: the provider could not be reached or gave an answer we cannot read; nothing is blocked.

last_check_error*string

The provider's OAuth error code from the last check, if any.

Example: "invalid_client"

created_at*string

When the provider was created (ISO 8601).

updated_at*string

When the provider was last changed (ISO 8601).

Example

Request

PUT https://api.auth.productcraft.co/v1/apps/{app_id}/auth-config/providers/{provider}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "config": {},
  "enabled": false
}

Response

{
  "provider": "google",
  "enabled": false,
  "config": {},
  "last_check_at": "2026-01-01T00:00:00.000Z",
  "last_check_result": {},
  "last_check_error": "invalid_client",
  "created_at": "string",
  "updated_at": "string"
}