Axios-module: double bearers in authorization field in 5.5.0 for nuxt/Auth

Created on 23 May 2019  路  6Comments  路  Source: nuxt-community/axios-module

Version

v5.5.0

Reproduction link

https://codepen.io

Steps to reproduce

axios: {
baseURL: process.env.API_ENDPOINT,
withCredentials: true
},

/////

auth: {
redirect: {
login: '/login/',
logout: '/',
callback: '/login/',
home: '/control/'
},
resetOnError: true,
fullPathRedirect: true,
rewriteRedirects: true,
strategies: {
password_grant: {
_scheme: 'local',
endpoints: {
login: {
url: 'api/v1/oauth/token/',
method: 'post',
propertyName: 'access_token'
},
logout: false,
user: {
url: 'api/v1/account/me/',
method: 'get'
}
}
},

  'laravel.passport': {
    url: process.env.API_ENDPOINT,
    client_id: process.env.PASSPORT_CLIENT_ID,
    client_secret: process.env.PASSPORT_CLIENT_SECRET
  }
}

},

What is expected ?

Getting a token
getting user data

What is actually happening?

got token - ok
for getting user data sending
authorization: Bearer ...... , Bearer .......
...
got 401

for version 5.4.1 - no any problem

This bug report is available on Nuxt community (#c249)
bug-report confirmed

Most helpful comment

fixed in @nuxtjs/[email protected]

All 6 comments

I can confirm the same behaviour, also tried in changing the default tokenName for local strategy to lowercase 'authorization', but the issue stays (btw I noticed that every header sent with the request is Camel-Cased except for 'authorization' that now is all lowercase)

same problem

same problem too

i can confirme too, but not present in 5.4.2

Sorry for inconveniences. It is probably related to 2e514a4. Will investigate more.

fixed in @nuxtjs/[email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daolou picture daolou  路  3Comments

jb-alvarado picture jb-alvarado  路  3Comments

mclighter picture mclighter  路  3Comments

mrleblanc101 picture mrleblanc101  路  4Comments

ealves-pt picture ealves-pt  路  3Comments