/{app_slug}/.well-known/openid-configurationOAuth 2.0 / OIDC discovery document (subset)
Returns `issuer`, `jwks_uri`, `token_endpoint`, `introspection_endpoint`, `userinfo_endpoint` (= `/me`), and the supported grant + signing options. Use this from SDKs / verifiers instead of hardcoding paths.
Path parameters
app_slug*stringSlug of the app.
Response · 200
issuer*stringToken `iss` claim — the Auth API base URL with the app slug appended. Pin this literally in your verifier so a token minted for another app on the platform cannot pass.
Example: "https://api.auth.productcraft.co/<slug>"
jwks_uri*stringIssuer-aligned JWKS URL — exactly `issuer + '/.well-known/jwks.json'`, which is what OIDC Discovery §4 relying parties expect. The older `/<slug>/v1/.well-known/jwks.json` alias serves the identical document and is not going away.
Example: "https://api.auth.productcraft.co/<slug>/.well-known/jwks.json"
token_endpoint*stringURL of the M2M token endpoint (`POST /{app_slug}/v1/oauth/token`, client-credentials grant).
Example: "https://api.auth.productcraft.co/<slug>/v1/oauth/token"
introspection_endpoint*stringURL of the token introspection endpoint (RFC 7662).
Example: "https://api.auth.productcraft.co/<slug>/v1/oauth/introspect"
userinfo_endpoint*stringOIDC userinfo equivalent — returns the signed-in EndUser profile.
Example: "https://api.auth.productcraft.co/<slug>/v1/me"
heimdall_verify_endpoint*stringAuth-specific verify endpoint. Not part of standard OIDC.
Example: "https://api.auth.productcraft.co/<slug>/v1/verify"
heimdall_authorize_endpoint*stringAuth-specific authorize endpoint. Not part of standard OIDC.
Example: "https://api.auth.productcraft.co/<slug>/v1/authorize"
heimdall_admin_users_endpoint*stringCustomer-product admin lane root. M2M-callable user CRUD.
Example: "https://api.auth.productcraft.co/<slug>/v1/admin/users"
grant_types_supported*arrayOAuth 2.0 grant types the token endpoint accepts.
Example: ["client_credentials"]
response_types_supported*arrayOAuth 2.0 response types supported (OIDC Discovery requires the field).
Example: ["token"]
token_endpoint_auth_methods_supported*arrayHow M2M clients authenticate at the token endpoint.
Example: ["client_secret_post"]
id_token_signing_alg_values_supported*arrayJWS algorithms the app signs its tokens with.
Example: ["RS256"]
subject_types_supported*arraySubject identifier types (OIDC Discovery); always `public`.
Example: ["public"]
Example
Request
GET https://api.auth.productcraft.co/{app_slug}/.well-known/openid-configurationimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const openIdConfiguration = await auth.consumer("my-app").wellKnown.openidConfiguration();auth.consumer(…).wellKnown.openidConfiguration(options?): Auth.OpenIdConfiguration
Response
{
"issuer": "https://api.auth.productcraft.co/<slug>",
"jwks_uri": "https://api.auth.productcraft.co/<slug>/.well-known/jwks.json",
"token_endpoint": "https://api.auth.productcraft.co/<slug>/v1/oauth/token",
"introspection_endpoint": "https://api.auth.productcraft.co/<slug>/v1/oauth/introspect",
"userinfo_endpoint": "https://api.auth.productcraft.co/<slug>/v1/me",
"heimdall_verify_endpoint": "https://api.auth.productcraft.co/<slug>/v1/verify",
"heimdall_authorize_endpoint": "https://api.auth.productcraft.co/<slug>/v1/authorize",
"heimdall_admin_users_endpoint": "https://api.auth.productcraft.co/<slug>/v1/admin/users",
"grant_types_supported": [
"client_credentials"
],
"response_types_supported": [
"token"
],
"token_endpoint_auth_methods_supported": [
"client_secret_post"
],
"id_token_signing_alg_values_supported": [
"RS256"
],
"subject_types_supported": [
"public"
]
}