Client SDK

Integrate with Connectas without rebuilding authentication.

The Connectas client SDK keeps the relying-party transaction, PKCE, callback verification and logout on your server. The public API is Connectas-owned; reserved OAuth/OIDC mechanics remain in the identity runtime.

Server-side quickstart

Supported today for confidential, server-rendered applications with an exact HTTPS callback and a server-held secret reference.

connectas-client.mjs
import {
  createConnectasClient,
  MemoryRelyingPartyTransactionStore
} from '@connectas/client';

export async function createProductClient({ secrets, redirectUri }) {
  return createConnectasClient({
    issuer: process.env.CONNECTAS_AUTH_ISSUER,
    clientId: process.env.CONNECTAS_OIDC_CLIENT_ID,
    clientSecret: await secrets.resolve(
      process.env.CONNECTAS_OIDC_CLIENT_SECRET_REF
    ),
    redirectUri,
    scopes: ['openid', 'profile', 'email'],
    // Use a durable, one-use transaction store in a deployed service.
    transactionStore: new MemoryRelyingPartyTransactionStore()
  });
}

// Server-side only: create the authorization URL and keep state in an
// HttpOnly, SameSite=Lax cookie. Never put a client secret in browser code.

Runtime-authoritative scopes

The identity runtime owns the scope registry, consent enforcement and token claims. Connectas owns the customer-facing catalog reference, application selection, descriptions and consent presentation. An application can request only scopes present in the runtime catalog; a console change cannot create a runtime capability.

Integration modes

ModeStatusContract
Confidential server-rendered web appSupportedAuthorization code, server-held secret, one-use server transaction and exact callback.
Single-page applicationTestedPublic-client authorization code + PKCE S256 with exact HTTPS redirects; live callback replay recorded 2026-11-05.
Native / mobilePlannedLoopback/custom-scheme redirect, platform evidence and app-binding policy are not yet accepted.
Machine-to-machinePlannedClient-credentials/service identity and scoped API-key contracts are runtime-owned and not yet exposed.

Application layer

Connectas is the application layer: it can present application registration, exact redirect URIs, scope selection, connection policy, credential references and API-key lifecycle. It does not issue OAuth tokens, validate access tokens or define capabilities outside the runtime catalog.