Protocol Guide

OIDC Configuration

A step-by-step walkthrough for setting up OpenID Connect clients, scopes, redirect URIs, and testing the full auth flow.

What is OIDC?

OpenID Connect (OIDC) is an identity layer on top of OAuth 2.0. It lets client applications verify the identity of end users and obtain basic profile information via ID tokens.

Idenplane implements OIDC 1.0 with support for the Authorization Code flow (with PKCE, S256 only), Client Credentials, Refresh Token, Device Authorization and Resource Owner Password grants, and standard Discovery. ID and access tokens are signed with RS256 using a per-realm RSA key published at the JWKS endpoint.

Discovery Document

Every realm exposes a standard OIDC Discovery document. Libraries use this URL to automatically configure themselves.

Terminal
curl https://auth.example.com/realms/my-realm/.well-known/openid-configuration

The document lists the authorization endpoint, token endpoint, JWKS URI, supported scopes, grant types, and more.

Creating an OIDC Client

Follow these steps in the Admin Console:

  1. 1

    Open the Admin Console

    Navigate to /console and select your realm.

  2. 2

    Create a new Client

    Go to Clients → Create Client. Optionally start from a template, then choose Confidential (server-side apps) or Public (SPAs, mobile).

  3. 3

    Set the Client ID

    Use a unique identifier like my-nextjs-app. This goes in your IDENPLANE_CLIENT_ID env variable.

  4. 4

    Configure Redirect URIs

    Add every URL that Idenplane is allowed to redirect to after login, e.g. http://localhost:3000/api/auth/callback/idenplane.

  5. 5

    Copy the Client Secret

    For confidential clients, copy the generated secret and store it in IDENPLANE_CLIENT_SECRET.

Token Endpoints

Endpoint URL
Authorization /realms/{realm}/protocol/openid-connect/auth
Token /realms/{realm}/protocol/openid-connect/token
UserInfo /realms/{realm}/protocol/openid-connect/userinfo
JWKS /realms/{realm}/protocol/openid-connect/certs
End Session /realms/{realm}/protocol/openid-connect/logout

Standard Scopes

openid

Required. Returns an ID token with the user's sub claim.

profile

Returns name, given_name, family_name, preferred_username, updated_at.

email

Returns email and email_verified claims.

roles

Returns the user's realm and client roles in the token.

Testing with curl

Use the Client Credentials flow to quickly test your setup — no browser required.

Terminal — Get Access Token
curl -X POST \
  https://auth.example.com/realms/my-realm/protocol/openid-connect/token \
  -d "grant_type=client_credentials" \
  -d "client_id=my-service" \
  -d "client_secret=YOUR_SECRET"
Terminal — Inspect Token
# Decode the JWT payload (no signature verification)
TOKEN="eyJhbGci..."
echo $TOKEN | cut -d'.' -f2 | base64 -d | jq .