nuxt-community / auth-module

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

$auth loginWith function not setting this.$auth.user data #1849

Open enzortk opened 1 year ago

enzortk commented 1 year ago

Version

module: 5.0.0-1624817847.21691f1 nuxt: 2.16.1

Nuxt configuration

 auth: {
    strategies: {
      local: {
        scheme: 'refresh',
        token: {
          property: 'access_token',
          default: 300,
          required: true
        },
        refreshToken: {
          property: 'refresh_token',
          data: 'refresh_token',
          maxAge: 60 * 60 * 24 * 30
        },
        user: {
          property: false
        },
        endpoints: {
          login: { url: '/auth/sign-in', method: 'post' },
          refresh: { url: '/auth/refresh-token', method: 'post' },
          user: { url: '/auth/me', method: 'get' },
          logout: { url: '/auth/logout', method: 'post' }
        }
      }
    }
  },

Reproduction

:warning: without a minimal reproduction we won't be able to look into your issue

What is expected?

Load the user data in $auth.user

What is actually happening?

When jwt has many permissions, the module seems to not setting the data in $auth.user variable ( Token has 5Kb )

Steps to reproduce

execute await this.$auth.loginWith with the corresponding params

Additional information

I try to set the user info manually as I saw on other bug reports but also doesn't work

Checklist