nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 924 forks source link

Getting error when Trying to add local stategies #1789

Closed imanaspaul closed 1 year ago

imanaspaul commented 1 year ago

Version

module: 5.0.0-1648802546.c9880dc nuxt: 2.15.8

Nuxt configuration

mode:

Nuxt configuration

If relevant, please include the configuration you are using for this module.
For example:
  auth: {
    redirect: {
      login: '/login',
      logout: '/login',
      callback: '/login',
      home: '/',
    },
    strategies: {
      local: {
        scheme: 'refresh',
        token: {
          property: 'access_token',
          maxAge: 1800,
          global: true,
          type: 'Bearer',
        },
        refreshToken: {
          property: 'refresh',
          maxAge: 60 * 60 * 24 * 30,
        },
        endpoints: {
          login: {
            url: 'http://localhost:9000/api/v1/signup/google/',
            method: 'post',
          },
          refresh: {
            url: 'http://localhost:9000/api/auth/refresh',
            method: 'post',
          },
          user: {
            url: 'http://localhost:9000/api/v1/userinfo/',
            method: 'get',
          },
        },
      },
    },
  },

What is actually happening?

When I going with v4 then everything working fine, but I can't get refresh_token when I am using refresh strategies