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 — with CMTY · 6 comments

Comments

Projects
None yet
6 participants
Copy link

commented May 22, 2019 — with CMTY

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)

@cmty cmty bot added the cmty:bug-report label May 22, 2019

@dappiu

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented May 23, 2019

same problem

@multiart

This comment has been minimized.

Copy link

commented May 23, 2019

same problem too

@alexis-loumeau

This comment has been minimized.

Copy link

commented May 23, 2019

i can confirme too, but not present in 5.4.2

@pi0

This comment has been minimized.

Copy link
Member

commented May 23, 2019

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

@pi0

This comment has been minimized.

Copy link
Member

commented May 23, 2019

fixed in @nuxtjs/axios@5.5.1

@pi0 pi0 closed this May 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.