Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
victorlmneves opened this issue Dec 1, 2023 · 5 comments
Labels
bug A bug that needs to be resolved p3 Minor issue

Comments

@victorlmneves
Copy link

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

@Richard0528
Copy link

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

@zoey-kaiser zoey-kaiser added p3 Minor issue bug A bug that needs to be resolved and removed bug labels Feb 23, 2024
@devseckobz
Copy link

issue still exist on latest version 0.7.0

@gspgsp
Copy link

gspgsp commented Mar 14, 2024

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.

@gomiunik
Copy link

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

@ToniG22
Copy link

ToniG22 commented Oct 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that needs to be resolved p3 Minor issue
Projects
None yet
Development

No branches or pull requests

7 participants