Oauth 2.0 Not refreshing Token

I am having issues with the Oauth2 set up. I Have a quickbooks Online link that is working with out issues, and a Nocodb set up that is also working with out issues, and a few others, but this custom one is not refreshing and giving me issues. Ive read through a few of the other posts regarding token refreshing and i cant seem to find anything magic bullet that would help here. hopefully i did not miss anything.

Describe the problem/error/question

I set up a custom Oauth2 connection for the jobber API (here https://developer.getjobber.com/docs/building_your_app/app_authorization/#step-4-application-requests-access-token) . It seems the initial set up works ok.


image

When i click connect, it opens up and connects properly, but when i close the window it shows me this screen, as if it didnt work.
image

When i use the credentials in a graphql or http request they work for the hour the token is active, but once the hour is up, the tokens do not refresh and i get the error message 401, unauthorized, or “access token expired”. Problem is the flow continues going with this error as the output so it seems like its working even though its not.

I am a beginner when it comes to this stuff, so thank you in advance to anyone that can help!

Information on your n8n setup

  • n8n version: 1.41.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Running on Docker
  • Operating system: Linux

Hi @YellowRiverCar! Thanks for reaching out and being a part of the community!

Looking through Jobber’s API documentation, they mention that by default they rotate the refresh token. https://developer.getjobber.com/docs/building_your_app/app_authorization/#refresh-token-flow

You should be able to disable this behavior such that the token will be long-lived, though that will prevent you from being able to submit your Jobber app to their marketplace. https://developer.getjobber.com/docs/building_your_app/refresh_token_rotation/

I hope this was helpful. Best of luck, and happy building!