What OAuth 2.0 with PKCE is
OAuth 2.0 is the standard protocol for an app to request access on behalf of a user without ever seeing their password. The user logs into Cativa, Cativa hands your app a temporary code, and your app exchanges that code for anaccess_token.
PKCE (Proof Key for Code Exchange) is a security layer on top of OAuth. Before sending the user to log in, you generate a random secret (the code_verifier) and send only its hash (the code_challenge). When you exchange the code for a token, you reveal the original code_verifier. Cativa recomputes the hash and checks it. This stops anyone who intercepts the code from using it, because they don’t have the code_verifier.
Cativa SSO endpoints follow the OIDC standard and are organized by tenant slug (
{customerName}). That slug is the community’s public subdomain. Confirm with the tenant admin which value to use. The endpoint base is https://apis.cativalab.digital/tenant/api/v2/sso/{customerName}.The flow at a glance
1
Create an OAuth App in the Console
Go to app.cativa.digital/admin/developers, OAuth Apps tab, click Create app.Save the returned
client_id and client_secret. The secret is shown only once, store it carefully in a credentials vault.2
Configure the redirect URI
In the same modal, add your redirect URI (e.g.
https://myapp.com/callback, or http://localhost:3000/callback for development). The redirect_uri you send later must match exactly one of the ones registered here.3
Redirect the user to /authorize
On the frontend, generate a
code_verifier and code_challenge (PKCE), store the verifier in the session, and redirect to the tenant’s /authorize endpoint:4
Exchange the code for an access_token in the callback
After the user consents, Cativa redirects to your URL with The response follows the OIDC standard:
?code=...&state=.... On the backend, POST to the same tenant’s /token endpoint with the body in application/x-www-form-urlencoded:5
Fetch the user's info
Use the Response:The
access_token against the userinfo endpoint:sub is the user’s stable ID in Cativa. Use it as the key to tie the user to your app’s session.The tenant’s OIDC discovery document lives at
https://apis.cativalab.digital/tenant/api/v2/sso/{customerName}/.well-known/openid-configuration and lists every endpoint (authorize, token, userinfo, jwks) plus the supported algorithms (S256 for PKCE, ES256 for id_token signing). The public JWKS is served at https://apis.cativalab.digital/tenant/api/v2/sso/{customerName}/jwks. Libraries like jose (Node) or PyJWT (Python) read the discovery doc and validate the id_token automatically.Next steps
Full SSO guide
SPA, backend, and mobile,
id_token validation via JWKS, token refresh, and common errors.Tenants and Customers
Understand the
customerName concept in the OIDC flow and when tenant matters in integrations.First API call
For server-to-server integrations, use an API Key directly instead of OAuth.
Badges as Permissions
How the user’s
sub connects to what they can access in the community.