# OAuth2 - newest refreshtoken not being used - waiting for token to expire?

**URL:** <https://community.n8n.io/t/oauth2-newest-refreshtoken-not-being-used-waiting-for-token-to-expire/88233>\
**Category:** Questions\
**Created:** [March 14, 2025, 9:01am UTC](https://community.n8n.io/t/oauth2-newest-refreshtoken-not-being-used-waiting-for-token-to-expire/88233 "2025-03-14T09:01:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonas\_Carlsson](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jonas_carlsson/32/59317_2.png) [@Jonas\_Carlsson](https://community.n8n.io/u/Jonas_Carlsson)\
**Post date:** [March 14, 2025, 9:01am UTC](https://community.n8n.io/t/oauth2-newest-refreshtoken-not-being-used-waiting-for-token-to-expire/88233/1 "2025-03-14T09:01:30Z")

</div>

Hi guys,

I’m using the built-in OAuth2-authentication to access a main ledger provider in Sweden. I talked to their support and they claim that my requests keep using the same refresh-token that once was issued a month ago (which is valid for 45 days) but “ignoring” the new refresh-token that is handed out everytime the access-token is being refreshed.

The newest refresh-token should be used in order not to have to manually go through the auth-process again. The key here is not to let the refresh-token expire.

Am I doing something wrong, missing a setting somewhere or what’s your thoughts?

I’d be greatful for every bit of suggestion that might lead me to a solution.  
Thanks!

Selfhosted (1.76.3)  
Docker

---

<div class="post-metadata">

**Author:** ![ThinkBot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thinkbot/32/62172_2.png) [@ThinkBot](https://community.n8n.io/u/ThinkBot)\
**Post date:** [March 14, 2025, 7:58pm UTC](https://community.n8n.io/t/oauth2-newest-refreshtoken-not-being-used-waiting-for-token-to-expire/88233/2 "2025-03-14T19:58:15Z")

</div>

Could you show your oauth credential setup (blur/remove half of keys)?

Without knowing much else, my best suggestion is to manually store the refresh + auth token in a google sheet or database, and before every request, manually refresh and update new entries into the db. We have to do that with a few custom oauth integrations.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [June 12, 2025, 7:58pm UTC](https://community.n8n.io/t/oauth2-newest-refreshtoken-not-being-used-waiting-for-token-to-expire/88233/3 "2025-06-12T19:58:18Z")

</div>

Closed on June 12, 2025, 7:58pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
