nuxt-alt / auth

An alternative module to @nuxtjs/auth
https://nuxt-alt-auth.vercel.app/
MIT License
112 stars 20 forks source link

Redirect after login not work after upgrade to nuxt 3.12.1 #116

Open nasirDoe opened 5 months ago

nasirDoe commented 5 months ago

Environment

chrome Macos Node 20 Nuxt 3.12.1

Nuxt Config

auth: {
    globalMiddleware: true,
    strategies: {
      local: {
        token: {
          property: 'data.token',
          maxAge: 1000 * 60 * 60, // 1 hour
          global: true,
        },
        user: {
          property: 'data', // `user` property is now `user.property`
          autoFetch: true,
        },
        endpoints: {
          login: { url: '/auth/signin', method: 'post' },
          user: { url: '/member/getMemberProfile', method: 'get' },
          logout: { url: '/auth/logout', method: 'post' },
        },
      },
    },
    redirect: {
      login: '/account/login',
      logout: '/',
      callback: '/',
      home: '/',
    },
  },

Reproduction

-

Describe the bug

after upgrade to new version off nuxt 3.12.1. Finally i downgrade to version 3.11.2 and work again

Additional context

-

Logs

-