Atlassian refresh token invalid request
brew-jim opened this issue · comments
Hello,
It looks like there may be a bug in the Atlassian provider as the following code:
const newTokens = await atlassian.refreshAccessToken('...');
Produces an error:
OAuth2RequestError: invalid_request at OAuth2Client.sendTokenRequest
Looking into the codebase I think there may be a wrong method call in arctic/dist/providers/atlassian.js
async refreshAccessToken(refreshToken) {
const result = await this.client.validateAuthorizationCode(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
// ...
}
Should be:
async refreshAccessToken(refreshToken) {
const result = await this.client.refreshAccessToken(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
// ...
}
Many thanks,
Jim