nuxt-auth icon indicating copy to clipboard operation
nuxt-auth copied to clipboard

Object literal may only specify known properties, and 'auth' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>'

Open victorlmneves opened this issue 2 years ago • 3 comments

Environment


  • Operating System: Darwin
  • Node Version: v18.14.1
  • Nuxt Version: 3.8.0
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.0
  • Package Manager: [email protected]
  • Builder: -
  • User Config: devtools, typescript, css, postcss, runtimeConfig, modules, auth
  • Runtime Modules: @sidebase/[email protected]
  • Build Modules: -

Reproduction

https://github.com/victorlmneves/nuxt-auth0

Describe the bug

Argument of type '{ devtools: { enabled: false; }; typescript: { shim: false; }; css: string[]; postcss: { plugins: { autoprefixer: {}; }; }; runtimeConfig: { API_KEY: string | undefined; OPC_APIM_KEY: string | undefined; ... 8 more ...; AUTH0_CLIENT_SECRET: string | undefined; }; modules: string[]; auth: { ...; }; }' is not assignable to parameter of type 'InputConfig<NuxtConfig, ConfigLayerMeta>'. Object literal may only specify known properties, and 'auth' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>'

Additional context

I'm using Nuxt 3.8.0, @sidebase/nuxt-auth 0.6.2 and next-auth 4.2.1

Logs

No response

victorlmneves avatar Dec 01 '23 16:12 victorlmneves

Same issue here. Follow the get started steps and adding auth to the nuxt.config.ts gives the same error.

Richard0528 avatar Feb 23 '24 06:02 Richard0528

issue still exist on latest version 0.7.0

devseckobz avatar Mar 14 '24 11:03 devseckobz

same issue, there is no version constrains between nuxt-auth and nuxt. the defineNuxtConfig ts has no property named 'auth object', it is simary that, nuxt-v3.6 and nuxt-auth-v6 worked well.

gspgsp avatar Mar 14 '24 14:03 gspgsp

For me reinstalling dependencies worked (even though I've already added module and used nuxi to add module) npm i

gomiunik avatar Oct 10 '24 12:10 gomiunik

After adding the lines:

auth: {
    provider: {
      type: "authjs",
      trustHost: false,
      defaultProvider: "google",
      addDefaultCallbackUrl: true,
    },
  },

to your nuxt.config.ts make sure to install the packages again by running npm i or pnpm i.

ToniG22 avatar Oct 11 '24 10:10 ToniG22