Skip to content

fix: apiFetch no longer forces a hard reload on 401 (closes #826) - #895

Closed
Obiajulu-gif wants to merge 1 commit into
OlaGreat:mainfrom
Obiajulu-gif:fix/issue-826-split
Closed

fix: apiFetch no longer forces a hard reload on 401 (closes #826)#895
Obiajulu-gif wants to merge 1 commit into
OlaGreat:mainfrom
Obiajulu-gif:fix/issue-826-split

Conversation

@Obiajulu-gif

Copy link
Copy Markdown
Contributor

Split out of #842 per request. Closes #826.

)

apiFetch previously called window.location.reload() the instant a
request came back 401, destroying any in-progress form state (e.g. the
edit-profile form's 6 fields + custom asset list, or the dashboard's
notification toggles mid-save). It now dispatches an "auth:expired"
CustomEvent; a new AuthExpiredListener (mounted in Providers) shows a
re-auth prompt and lets the user navigate away deliberately via
router.replace("/") instead of a hard reload.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@Obiajulu-gif Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Obiajulu-gif

Copy link
Copy Markdown
Contributor Author

Closing — the original combined PR #842 (which this was split from) was already merged upstream, so this duplicates already-merged work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] apiFetch triggers full window.location.reload() on 401 — destroys unsaved form data

1 participant