Skip to content

Migrate React oidc-client-ts example to Vite, React 19 and react-oidc-context 3 - #29

Closed
Wictorgirardi wants to merge 2 commits into
p2-inc:mainfrom
Wictorgirardi:feat/react-oidc-client-ts
Closed

Wictorgirardi wants to merge 2 commits into
p2-inc:mainfrom
Wictorgirardi:feat/react-oidc-client-ts

Conversation

@Wictorgirardi

@Wictorgirardi Wictorgirardi commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #28: this branch includes its commit, so review the last commit only until #28 is merged.

Summary

  • Toolchain: Create React App → Vite 8, React 19.3, TypeScript 6.0, Tailwind CSS 4 (configured in CSS), ESLint 10 flat config and Prettier.
  • Auth libraries: react-oidc-context 2 → 3.3 and oidc-client-ts 2 → 3.5.
  • Config:
  • Auth fixes:
    • Redirects back to the current origin instead of the hardcoded production URL.
    • Logs out with signoutRedirect, so the Keycloak session ends too. It used to call removeUser, which only cleared local state.
    • Auth errors are now shown; before, that branch was unreachable.
  • UI:
    • Shows decoded access and ID tokens and drops the refresh-token panel.
    • Fixes the broken background fallback image and the GitHub link, which now points to this example.
    • Icons are inline SVG, so @iconify/react is no longer needed.
  • Tooling:
    • pnpm 10.34 via packageManager, Node 24 via .nvmrc and engines.
    • vercel.json pins the Vite preset, since the Vercel project was set up for CRA.
  • Workflow: now calls the shared CI and Vercel deploy workflows.

Test plan

  • pnpm install --frozen-lockfile && pnpm typecheck && pnpm lint && pnpm build pass on Node 24.
  • tools/e2e-smoke passes against the local Keycloak: log in, decoded tokens shown, log out.
  • Vercel preview deploy. It's skipped for PRs from forks, so it first runs after merge.

@Wictorgirardi

Copy link
Copy Markdown
Contributor Author

Combined into #44 with the other SPA examples. The changes are the same; only the commit SHAs differ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant