Skip to content

Commit

Permalink
fix(oauth refresh): OAuth2 scheme token refresh not working server-si…
Browse files Browse the repository at this point in the history
…de and silently errors out (#849)

Added required header for OAUTH2 scheme for SSR refreshTokens call
  • Loading branch information
AustinDavies committed Dec 5, 2020
1 parent 1feb21c commit 7f17cf5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/schemes/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ export default class Oauth2Scheme extends BaseScheme<typeof DEFAULTS> {
const response = await this.$auth.request({
method: 'post',
url: this.options.endpoints.token,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data: encodeQuery({
refresh_token: removeTokenPrefix(refreshToken, this.options.token.type),
client_id: this.options.clientId,
Expand Down

0 comments on commit 7f17cf5

Please sign in to comment.