Nuxt
Use oidc-spa in a pure Nuxt SPA app.
Before you start
The example
npx gitpick keycloakify/oidc-spa/tree/main/examples/nuxt-spa oidc-spa-nuxt-spa
cd oidc-spa-nuxt-spa
cp .env.local.sample .env.local
# Set your provider values in .env.local or enable mock mode
yarn install
yarn dev
# Start exploring with: app/plugins/01.oidc.client.tsInstallation
Required wiring
Disable SSR
Enable the Nuxt module
Create a client plugin
Expose auth helpers with a composable
Protect pages with route middleware
Runtime config
Routes in the example
Reusing this pattern in your app
Creating an API server
Backend Token ValidationLast updated
Was this helpful?