Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Atlassian refresh token invalid request #63

Closed
brew-jim opened this issue Feb 7, 2024 · 0 comments
Closed

Atlassian refresh token invalid request #63

brew-jim opened this issue Feb 7, 2024 · 0 comments

Comments

@brew-jim
Copy link

brew-jim commented Feb 7, 2024

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants