Auth API reference

Auth API · Apps

post/v1/apps/{app_id}/auth-config/providers/oidc/discoverAuth

Check an OpenID Connect issuer before adding it as a sign-in provider.

Fetches `{issuer}/.well-known/openid-configuration` (https only, public addresses only, 5 s, no redirects) and returns what Auth would use: the authorize, token and key endpoints, scopes and claims. The document must name exactly this issuer. Nothing is saved; saving an `oidc-<key>` provider runs the same check and fails with 422 when it does not pass.

Path parameters

app_id*string

Id of the app.

Request body

issuer*string · uri

The issuer to check: an https URL with no query or fragment, exactly as the provider names itself.

Example: "https://acme.okta.com"

Response · 200 The issuer answers with a usable discovery document.

issuer*string · uri

The issuer the discovery document names (equal to the one checked).

Example: "https://acme.okta.com"

authorization_endpoint*string · uri

Where sign-in sends people.

Example: "https://acme.okta.com/oauth2/v1/authorize"

token_endpoint*string · uri

Where Auth exchanges the sign-in code.

Example: "https://acme.okta.com/oauth2/v1/token"

jwks_uri*string · uri

The signing keys Auth verifies ID tokens with.

Example: "https://acme.okta.com/oauth2/v1/keys"

userinfo_endpoint*string · uri

The userinfo endpoint, if the provider lists one (not used by Auth).

Example: "https://acme.okta.com/oauth2/v1/userinfo"

scopes_supported*array

Scopes the provider says it supports, or null when it does not say.

Example: ["openid","email","profile"]

claims_supported*array

Claims the provider says it can return, or null when it does not say. Use these names in `claim_mapping`.

Example: ["sub","email","email_verified","name"]

id_token_signing_algs*array

ID token signing algorithms Auth will accept from this provider (`none` and shared-secret algorithms removed).

Example: ["RS256"]

code_challenge_methods_supported*array

PKCE methods the provider lists; Auth always sends S256.

Example: ["S256"]

token_endpoint_auth_methods_supported*array

Client authentication methods at the token endpoint, for `token_endpoint_auth_method`.

Example: ["client_secret_basic","client_secret_post"]

Example

Request

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

{
  "issuer": "https://acme.okta.com"
}

Response

{
  "issuer": "https://acme.okta.com",
  "authorization_endpoint": "https://acme.okta.com/oauth2/v1/authorize",
  "token_endpoint": "https://acme.okta.com/oauth2/v1/token",
  "jwks_uri": "https://acme.okta.com/oauth2/v1/keys",
  "userinfo_endpoint": "https://acme.okta.com/oauth2/v1/userinfo",
  "scopes_supported": [
    "openid",
    "email",
    "profile"
  ],
  "claims_supported": [
    "sub",
    "email",
    "email_verified",
    "name"
  ],
  "id_token_signing_algs": [
    "RS256"
  ],
  "code_challenge_methods_supported": [
    "S256"
  ],
  "token_endpoint_auth_methods_supported": [
    "client_secret_basic",
    "client_secret_post"
  ]
}