Three sample apps ship in the IntelliAuth repo. Each is intentionally small (one component, one route, one feature) so you can clone, run, and read the code in 15 minutes total.
sample-app — Basic React + PKCE
Section titled “sample-app — Basic React + PKCE”A minimal Vite + React app that demonstrates the authorization code with PKCE flow end-to-end. Single page; click Sign in, redirect to IntelliAuth, redirect back signed in, see your profile.
What it covers:
IntelliAuthProvidersetup.useIntelliAuth()for state.loginWithRedirect()+logout().- The
/callbackroute that completes the code exchange.
What it skips:
- Routing (single page).
- API calls (no backend).
- Styling (intentionally plain so the auth flow is the focus).
Best as your first read.
sample-app-2 — Multi-route React with API calls
Section titled “sample-app-2 — Multi-route React with API calls”The same React SDK setup, but expanded into a multi-route app that calls a protected backend API. Demonstrates:
- React Router with public + protected routes.
getAccessToken()for outbound calls.- A small Node + Express backend using
requireSessionmiddleware. - Graceful handling of
session_expired(redirect to login) andnetwork_error(toast + retry).
Run both the frontend (Vite) and the backend (Express) locally; the frontend sends authenticated requests to the backend.
sample-saml-app — SAML federation with Passport
Section titled “sample-saml-app — SAML federation with Passport”An Express app that federates authentication through IntelliAuth's SAML SP capability. Useful when your application has to plug into the enterprise SSO of an organisation that already runs Okta, Entra, or OneLogin and demands SAML.
What it covers:
- IntelliAuth tenant configured as a SAML SP.
- Express + Passport SAML strategy.
- The IdP-initiated and SP-initiated flows.
- ACS URL configuration.
- Attribute mapping (email, name, groups).
Smallest of the three; most useful when you specifically need SAML rather than OAuth/OIDC.
Getting the code
Section titled “Getting the code”All three live in the IntelliAuth public examples repo. Clone the one you want and follow the per-app README:
git clone https://github.com/intelliauth-co/examples.git intelliauth-examplescd intelliauth-examples/sample-appcp .env.example .env# edit .env: set INTELLIAUTH_TENANT_URL + INTELLIAUTH_CLIENT_IDpnpm installpnpm devEach app's README walks the specific setup (which tenant settings to flip, which application type to register, etc.).
When sample apps aren't enough
Section titled “When sample apps aren't enough”If your shape is genuinely unusual (a non-React framework, a server-rendered app, a backend in a language other than Node), the sample apps are still useful as protocol-level reference. The HTTP flows are the same regardless of language; SDKs are conveniences. The API reference documents every endpoint the samples hit.