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

double bearers in authorization field in 5.5.0 for nuxt/Auth #250

Closed
WtekSupport opened this issue May 22, 2019 · 6 comments
Closed

double bearers in authorization field in 5.5.0 for nuxt/Auth #250

WtekSupport opened this issue May 22, 2019 · 6 comments

Comments

@WtekSupport
Copy link

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)
@ghost ghost added the cmty:bug-report label May 22, 2019
@dappiu
Copy link

dappiu commented May 23, 2019

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)

@proaleks94
Copy link

proaleks94 commented May 23, 2019

same problem

@multiart
Copy link

same problem too

@alexis-loumeau
Copy link

alexis-loumeau commented May 23, 2019

i can confirme too, but not present in 5.4.2

@pi0
Copy link
Member

pi0 commented May 23, 2019

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

@pi0
Copy link
Member

pi0 commented May 23, 2019

fixed in @nuxtjs/[email protected]

@pi0 pi0 closed this as completed May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants