Closed RadBe closed 1 year ago
@RadBe useRuntimeConfig
is related ti Nuxt. Not for auth module.
Try this:
useAuth().tokenStrategy.token?.get()
The error occurs only when automatic imports are disabled in nuxt itself - because there is no direct import in the module and it crashes. If you enable automatic imports from nuxt - import useRuntimeConfig will resolve automatically.
I install clean nuxt and nuxt-alt. When run: npm run dev, I get error: 500 useRuntimeConfig is not defined project/.nuxt/auth.plugin.mjs:48:60
This place in here: https://github.com/nuxt-alt/auth/blob/main/src/plugin.ts#L40