ToolJet / ToolJet/ToolJet

HubSpot: OAuth access token is not refreshed after expiration

Open
#17,192 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug plugins
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?
  1. Configure a HubSpot datasource using OAuth.
  2. Verify that API requests succeed.
  3. Wait for the access token to expire (approximately 30 minutes), or use an expired access token.
  4. Execute another query using the datasource.
  5. Observe that the request fails with a 401 Unauthorized error instead of automatically refreshing the access token.
Screenshots or Screencast
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.