HubSpot: OAuth access token is not refreshed after expiration
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 40.9k
- Forks
- 5.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 202
Description
What is the expected behaviour?
When the access token expires (every 30 minutes), the datasource should automatically use the stored refresh token to obtain a new access token.
What is the current behaviour?
After the access token expires, API requests fail with the following error:
{
"status": "error",
"statusCode": 401,
"statusMessage": "Unauthorized",
"message": "The OAuth token used to make this call expired 5 hour(s) ago.",
"category": "EXPIRED_AUTHENTICATION",
"correlationId": "019f601e-af3d-7912-b920-31130b6240c9"
}
How to reproduce the issue?
- Configure a HubSpot datasource using OAuth.
- Verify that API requests succeed.
- Wait for the access token to expire (approximately 30 minutes), or use an expired access token.
- Execute another query using the datasource.
- Observe that the request fails with a 401 Unauthorized error instead of automatically refreshing the access token.
Screenshots or Screencast
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the HubSpot datasource's OAuth request and token handling, then reproduce the failure with an expired access token as described. Done means a subsequent API query automatically uses the stored refresh token to obtain a new access token and succeeds instead of returning a 401 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100