Repository navigation
Migrate Vue example to Vite 8, vue-router 5 and oidc-client-ts 3 - #32
Closed
Wictorgirardi wants to merge 2 commits into
Closed
Wictorgirardi wants to merge 2 commits into
Wictorgirardi wants to merge 2 commits into
Conversation
This was referenced Sep 24, 2026
Contributor
Author
|
Combined into #44 with the other SPA examples. The changes are the same; only the commit SHAs differ. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #28: this branch includes its commit, so review the last commit only until #28 is merged.
Summary
create-vue(3.24): Vite 4 → 8, vue-router 4 → 5, vue-tsc 1 → 3, TypeScript 5.1 → 6.0, ESLint 8 → 10 flat config (@vue/eslint-config-typescript), Tailwind CSS 3 → 4 (configured in CSS). The devtools plugin, oxlint and npm-run-all are left out to keep the example small.src/auth.ts: a singleUserManager, configured from.env(VITE_OIDC_ISSUER_URI,VITE_OIDC_CLIENT_ID). It now uses the library's default session storage; the old explicitWebStorageStateStorestored tokens in localStorage.src/composables/useAuth.ts: reactive user state driven by oidc-client-ts events, withsignIn/signOut.<script setup lang="ts">everywhere. This replaces the Options API and the untyped$authglobal, which was assigned aftermount()./silent-refreshnow callssigninSilentCallback(). It used to call a non-existentrenewToken()./authreturns to the page the login started from./unauthenticatedroute.iconify-iconweb component).className/htmlForReact-isms, the "(keycloak-js)" header label and the README titled "React".AppHeader,AppFooter,UserStatus,TokenPanels), aseslint-plugin-vuerequires.packageManager, Node 24 via.nvmrc/engines.vercel.jsonpins the Vite preset and keeps the SPA rewrite.Test plan
pnpm install --frozen-lockfile && pnpm typecheck && pnpm lint && pnpm buildpass on Node 24.tools/e2e-smokepasses against the local Keycloak: log in, decoded tokens shown, log out.