nuxt-alt / auth

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

Refresh token not working in new version #33

Closed RadBe closed 1 year ago

RadBe commented 1 year ago

After this commit https://github.com/nuxt-alt/auth/commit/d45f976497189209cd0348ef603213752543809e refresh token not called. With my config

auth: {
    strategies: {
      localStorage: false,
      local: {
        scheme: 'refresh',
        token: {
          property: 'token',
          global: true,
          maxAge: 60
        },
        refreshToken: {
          property: 'refreshToken',
          data: 'token',
          maxAge: 86400 * 30 //30d
        },
        endpoints: {
          csrf: false,
          login: { url: 'http://localhost:3001/api/auth/login', method: 'post' },
          logout: { url: 'http://localhost:3001/api/auth/logout', method: 'post' },
          user: { url: 'http://localhost:3001/api/auth/user', method: 'get' },
          refresh: { url: 'http://localhost:3001/api/auth/refresh', method: 'post' },
        },
        user: {
          property: 'account',
          autoFetch: true
        },
      },
    }
  }
toniengelhardt commented 1 year ago

I also get constant logouts...