NuxtN
Nuxt3mo ago
4 replies
mpgalaxy

nuxt-auth-utils not finding env variables

Hi, I'm trying to get nuxt-auth-utils running with nuxt 4.2.0 and nuxt-auth-utils 0.5.25 using keycloak as oauth provider. I provided the NUXT_OAUTH_KEYCLOAK_CLIENT_ID, NUXT_OAUTH_KEYCLOAK_SERVER_URL and NUXT_OAUTH_KEYCLOAK_REALMvariables in my .env file, also set runtimeConfig with
oauth: {
        keycloak: {
          clientId: "myclient",
          realm: "myrealm",
          serverUrl: "http://localhost:8080",
        },
      },

but the module always complains not having these env variables:
`
Missing NUXT_OAUTH_KEYCLOAK_CLIENT_ID or NUXT_OAUTH_KEYCLOAK_CLIENT_SECRET or NUXT_OAUTH_KEYCLOAK_SERVER_URL or NUXT_OAUTH_KEYCLOAK_REALM env variables.

This is in dev mode.
How can I get this working ?
Was this page helpful?