Auth API reference

Auth API · Apps

post/v1/apps/{app_id}/auth-config/providers/{provider}/checkAuth

Check the saved provider credentials with the provider.

Calls the provider's token endpoint with a dummy sign-in code. If the provider refuses the client (`invalid_client`, GitHub `incorrect_client_credentials` or `unknown_client`), the result is `credentials_rejected` and the provider shows as `blocked` with reason `credentials_rejected` until the credentials are fixed. If it only refuses the code (`invalid_grant`, `bad_verification_code`), the credentials are valid. Nobody is signed in. For an OpenID Connect provider the issuer's discovery document is fetched first; when it cannot be used the result is `inconclusive` with a `discovery_*` provider error and the provider shows as `blocked` with reason `discovery_failed`. The result is saved on the provider (`last_check_*`). The same check runs automatically whenever the credentials are saved. Works for a provider that is saved but not switched on yet.

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`).

Response · 200

provider*string

The sign-in provider that was checked.

Example: "google"

result*object

`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.

Example: "credentials_rejected"

provider_error*string

The provider's own OAuth error code from its token endpoint (`invalid_client`, `incorrect_client_credentials`, `invalid_grant`, `redirect_uri_mismatch`, …), or null when it gave none. For an OpenID Connect provider whose discovery document could not be used it is one of `discovery_not_https`, `discovery_blocked`, `discovery_unreachable`, `discovery_invalid` or `discovery_issuer_mismatch` (with result `inconclusive`). GitHub answers an unknown client id with a plain 404; that is reported as `unknown_client`. `redirect_uri_mismatch` with `credentials_valid` means the client is right but the redirect URI registered at the provider is not `callback_url`.

Example: "invalid_client"

checked_at*string · date-time

When the check ran (ISO 8601).

callback_url*string · uri

The exact redirect (callback) URL to register at the provider for this app.

Example: "https://api.auth.productcraft.co/acme/v1/auth/oauth/google/callback"

Example

Request

POST https://api.auth.productcraft.co/v1/apps/{app_id}/auth-config/providers/{provider}/check
Authorization: Bearer YOUR_TOKEN

Response

{
  "provider": "google",
  "result": "credentials_rejected",
  "provider_error": "invalid_client",
  "checked_at": "2026-01-01T00:00:00.000Z",
  "callback_url": "https://api.auth.productcraft.co/acme/v1/auth/oauth/google/callback"
}