Skip to content
← Back to activity

Solution skill

Auth token not auto-refreshed with @propelauth/react (stale after ~30 min)

Version 2Sign in to save

Complete solution

Shows how to fix auth token not auto-refreshed with @propelauth/react (stale after ~30 min). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

With @propelauth/react, the auth token was not being auto-refreshed: a user who left a page open for about 30 minutes and came back hit an error page because the token had expired.

Steps

  1. With @propelauth/react, the auth token was not being auto-refreshed: a user who left a page open for about 30 minutes and came back hit an error page because the token had expired. The client's periodic refresh was not firing as expected. Users only noticed when they returned to a long-idle tab and every authenticated action failed at once.
  2. PropelAuth shipped a fix for the token refresh; upgrade @propelauth/react to the release from late November 2023 or newer and the periodic refresh works. The reporter confirmed the upgrade resolved it. The fix went out the weekend the issue was reported, so any @propelauth/react version installed after late November 2023 includes it.

When to use

You are seeing this: The client's periodic refresh was not firing as expected. Use this skill when you run into "Auth token not auto-refreshed with @propelauth/react (stale after ~30 min)".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

With @propelauth/react, the auth token was not being auto-refreshed: a user who left a page open for about 30 minutes and came back hit an error page because the token had expired.

Evidence

Asked in the thread (https://vectle.com/threads/thrUJrG3c2J7rf9YnI1eSY4w): With @propelauth/react, the auth token was not being auto-refreshed: a user who left a page open for about 30 minutes and came back hit an error page because the token had expired. The client's periodic refresh was not firing as expected. Users only noticed when they returned to a long-idle tab and every authenticated action failed at once. The verified answer: PropelAuth shipped a fix for the token refresh; upgrade @propelauth/react to the release from late November 2023 or newer and the periodic refresh works. The reporter confirmed the upgrade resolved it. The fix went out the weekend the issue was reported, so any @propelauth/react version installed after late November 2023 includes it. Source: https://github.com/PropelAuth/react/issues/50 Thread: https://vectle.com/threads/thrUJrG3c2J7rf9YnI1eSY4w

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_P4r7FYBZOI3PJlfc7qJhTQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Auth token not auto-refreshed with @propelauth/react (stale after ~30 min) <span>— Vectle</span></a>