/v1/apps/{app_id}/auth-config/providers/{provider}/checkAuthCheck 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*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`).
Response · 200
provider*stringThe 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*stringThe 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-timeWhen the check ran (ISO 8601).
callback_url*string · uriThe 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_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const providerCheck = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").authConfig.providers.check("google");auth.admin.app(…).authConfig.providers.check(provider, options?): Auth.ProviderCheck
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"
}