opened
1shaked
username_0
<!--
IMPORTANT: Please use the following link to create a new issue:

https://cmty.app/nuxt/issues/new?repo=auth-module

If your issue was not created using the app above, it will be closed immediately.
-->
i used nuxt auth for my project and i have two problems
the first is with the auth in nuxt.config.js which not getting the token 
i used propertyName and token as i will show below 

```
auth: {
    strategies: {
      local: {
        endpoints: {
          login: { url: 'u/jwt/jwt/create/', method: 'post', propertyName: 'data.access' },
          logout: { url: 'u/jwt/jwt/refresh/', method: 'post' },
          user: { url: 'u/jwt/users/me/', method: 'get' , propertyName: ''}
        },
        // tokenRequired: false,
        tokenType: 'JWT'
      }
    }
  },
```
i also tried diffrent syntax
```
auth: {
    localStorage: false,
    strategies: {
      local: {
        token: {
          property: 'data.access'
        },
        refreshToken: {
          property: 'data.refresh' // change to your refresh token property
        },
        user: '',
        endpoints: {
          login: { url: 'u/jwt/jwt/create/', method: 'post' },
          logout: { url: 'u/jwt/jwt/refresh/', method: 'post' },
          user: { url: 'u/jwt/users/me/', method: 'get' }
        },
        tokenRequired: true,
        tokenType: 'JWT'
      }
    }
  }
```
but both of them could not get the token. 
i had to do this manually by doing 
```
this.$axios.post('u/jwt/jwt/create/', {
          email: this.form.email,
          password: this.form.password
      }).then(respond => {
        const token = respond.data.access
       this.$auth.setUserToken(token)
        this.$axios.$get('u/jwt/users/me/')
        .then(user => {
          this.$auth.setUser(user)
        })
      })
```
i even try to recreate the project and just try the login functionality but both did not got the token i checked in the cookies backend and localStorage (when i check local storege i change the config the localStorage ture).
can not get the token
issue
created
JoaoPedroAS51
username_1
Hi @username_0! Try to set token property to `access` without the `data.`
comment
created
1shaked
username_0
OK thx it is working when i am using the access without the data buu only when i am using properyName not when i am using the property object.
thanks alot.
comment
closed
1shaked
username_0
issue
created
JoaoPedroAS51
username_1
That's because property object is for v5 that wasn't released yet. `propertyName` is for v4
comment