I am performing an authentication system with nuxtjs/auth, the main problem is that the token is sent from the back as follows: Bearer token...
When nuxtjs/auth processes it, it adds another Bearer to the beginning, being as follows: Bearer Bearer eyJhbGciOiJIUzU...
How can it be avoided?
Here I have my strategy:
withoutotp: {
_scheme: 'local',
endpoints: {
login: {
url: '/users/v2/auth/bel',
method: 'post',
propertyName: 'response'
},
user: {
url: '/users/v2/clients',
method: 'get',
propertyName: 'response'
},
logout: {
url: '/users/v2/auth/logout',
method: 'post'
}
}
},
When you do have your string, use a
slice(7)
on it to remove the first Bearer.