Skip to content

Commit

Permalink
fix: ignore Authorization on login or token refresh (#1321)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
  • Loading branch information
pedrolamas committed Jan 22, 2024
1 parent cf69359 commit ef55129
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/store/auth/actions.ts
Expand Up @@ -87,7 +87,10 @@ export const actions: ActionTree<AuthState, RootState> = {
const keys = rootGetters['config/getTokenKeys']
const refresh_token = localStorage.getItem(keys['refresh-token'])
return httpClientActions.accessRefreshJwtPost(refresh_token || '', {
withAuth: false
withAuth: false,
headers: {
Authorization: undefined
}
})
.then(response => response.data.result)
.then((response) => {
Expand Down Expand Up @@ -120,7 +123,11 @@ export const actions: ActionTree<AuthState, RootState> = {

async login ({ commit, rootGetters }, { username, password, source }) {
const keys = rootGetters['config/getTokenKeys']
return httpClientActions.accessLoginPost(username, password, source)
return httpClientActions.accessLoginPost(username, password, source, {
headers: {
Authorization: undefined
}
})
.then(response => response.data.result)
.then(user => {
// Successful login. Set the tokens and auth status and move on.
Expand Down

0 comments on commit ef55129

Please sign in to comment.