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

nuxt.config.ts not loading auth from nuxt.config.ts #1847

Open
Nezo96 opened this issue Apr 23, 2023 · 1 comment
Open

nuxt.config.ts not loading auth from nuxt.config.ts #1847

Nezo96 opened this issue Apr 23, 2023 · 1 comment
Labels

Comments

@Nezo96
Copy link

Nezo96 commented Apr 23, 2023

Okay so idk if this is bug or i am dumb but when i add auth to nuxt.config.ts it seems to not detecting it. Idk why.

my nuxt.config.ts

export default defineNuxtConfig({
  modules: ["@sidebase/nuxt-auth"],
  css: ["~/assets/css/main.css"],
  postcss: {
    plugins: {
      tailwindcss: {},
      autoprefixer: {},
    },
  },
  runtimeConfig: {
    authSecret: "adsadawdawdawdawdadsadasd",
  },
  auth: {
    globalAppMiddleware: true,
  },
});

but if i use local middleware it works pefectly

definePageMeta({
  middleware: "auth",
  auth: {
    unauthenticatedOnly: true,
    navigateAuthenticatedTo: "/user-profile/getting_up",
  },
});
@genu
Copy link

genu commented May 11, 2023

It looks like you are trying to use this in Nuxt 3.

The docs probably need to be more clear, but this module is for Nuxt 2 only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants