/v1/apps/{app_id}/auth-config/providers/{provider}AuthWrite 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*stringId of the app.
provider*stringThe 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*objectProvider-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.
enabledbooleanWhether 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*stringThe 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*booleanWhether the provider is enabled.
config*objectCustomer-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-timeWhen the credential check last ran. Null until it has run for the saved credentials.
last_check_result*objectResult 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*stringThe provider's OAuth error code from the last check, if any.
Example: "invalid_client"
created_at*stringWhen the provider was created (ISO 8601).
updated_at*stringWhen 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
}import { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const providerDetail = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").authConfig.providers.replace("google", { config: {} });auth.admin.app(…).authConfig.providers.replace(provider, params, options?): Auth.ProviderDetail
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"
}