Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
enzortk opened this issue May 25, 2023 · 0 comments
Open
3 tasks done

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

enzortk opened this issue May 25, 2023 · 0 comments
Labels

Comments

@enzortk
Copy link

enzortk commented May 25, 2023

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
@enzortk enzortk added the bug label May 25, 2023
@enzortk enzortk changed the title $auth loginWith function not setting this.$auth.user $auth loginWith function not setting this.$auth.user data May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant