Skip to content

Commit

Permalink
fix(oauth2 scheme): unset baseURL in refreshTokens (#939)
Browse files Browse the repository at this point in the history
While _handleCallback has unset the baseURL when calling the token endpoint, refreshTokens currently uses the existing Axios baseURL.
This causes issues in cases where addAuthorize was used (i.e. the github strategy) as the new token endpoint becomes a relative URL pointing to the Nuxt server middleware.
  • Loading branch information
CS-Birb committed Dec 17, 2020
1 parent ec0152d commit 05a2348
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/schemes/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ export class Oauth2Scheme<
.request({
method: 'post',
url: this.options.endpoints.token,
baseURL: '',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
Expand Down

0 comments on commit 05a2348

Please sign in to comment.