Repository navigation
Migrate Nuxt oidc-client-ts example to Nuxt 4, oidc-client-ts 3 and Pinia 4 - #34
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
app/layout), TypeScript 6.0,@nuxt/eslintwith ESLint 10, and Tailwind CSS 4 through@tailwindcss/vite. Same scaffold as the Nuxt keycloak-js example (Migrate Nuxt keycloak-js example to Nuxt 4 and keycloak-js 26 #33).@pinia/nuxt0.4 → 1.0.services/application-service.tsimported a./keycloak-configfile that was deleted in 2024.app/plugins/oidc.client.ts: a singleUserManager. Before, everyuseServices()call created a new one, each with its own silent-renew timer.app/stores/auth.ts: a Pinia setup store driven by oidc-client-ts events, withsignIn,signOutand the callback handlers. Components read it withstoreToRefs; the old component copiedauthStore.userand lost reactivity.app/middleware/auth.global.ts: loads the stored user once, before any page renders.runtimeConfig.public(NUXT_PUBLIC_OIDC_ISSUER_URI,NUXT_PUBLIC_OIDC_CLIENT_ID), replacing therequire("dotenv")call (dotenv wasn't a declared dependency)./auth/realms/appended.WebStorageStateStoreused localStorage./logoutpage (logout issignOutRedirectfrom the store),overrides: { vue: "latest" }, and@nuxt/devtools: "latest"..env.example: targets the local Keycloak from Add shared CI workflows, local Keycloak and contributing guide #28. It used to contain the retiredusw2.auth.achost and the wrong client (remix-example).<script setup>everywhere, and the fixed "[oidc-client-js]" label.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.KEYCLOAK_*env vars on the Vercel project become unused and can be removed.