Developer example

React sample for standards-based OIDC login

Use the React sample when you need a public-client SPA baseline with modern OIDC login, clean callback handling, and a starting point your team can adapt fast.

React + oidc-client-ts SPA / public client with PKCE
Best for
  • React products that need a production-oriented login baseline instead of hand-rolled auth code.
  • Member portals, self-service frontends, and operational dashboards that start with browser-based sign-in.
  • Teams that want to start standards-first and add richer identity modelling later only when needed.
What this sample shows
  • Authorization Code + PKCE wiring for a browser-based client.
  • Login, callback, silent renew, and logout flow structure for a React SPA.
  • A maintainable baseline before you add product-specific permissions, profile views, or delegated flows.
Integration model

Use SPA login where it fits, not as a shortcut for every identity problem

This sample demonstrates the standard public-client pattern for React. It is a good fit for direct self-service sign-in. If your product later needs managed profiles or delegated handling, add that on top of the identity model rather than forcing everything into frontend session state.

These pages explain the sample on Tuurio's domain. GitHub remains the code host.

Stack
React + oidc-client-ts
Pattern
SPA / public client with PKCE
Source code auth_samples_react