Skip to content

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

Open

Description

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

⚠️ 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

  • I have tested with the latest Nuxt version and the issue still occurs
  • I have tested with the latest module version and the issue still occurs
  • I have searched the issue tracker and this issue hasn't been reported yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions