mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
fix(auth): keep the page when sign-out is refused
The sign-out mutation took every HTTP answer as success. A refused logout (403 from the demo guard, a 429, a 5xx) wiped the client caches and showed the sign-in page while the session cookie stayed valid, so the record pages opened again on the next visit. The call now goes through apiFetch, which throws on a non-2xx answer, and the error toast says the person is still signed in instead of naming a network error.
This commit is contained in:
1 parent
31f296a03e
commit
6d8f533deb
13 files changed
+123
-7
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$comment": "Comment lines that open with a release version, per file under src/. Maintained by src/__tests__/version-stamp-ratchet.test.ts.",
|
||||
"count": 2890,
|
||||
"total": 9216,
|
||||
"total": 9215,
|
||||
"entries": {
|
||||
"__tests__/account-payload-consumer-guard.test.ts": 2,
|
||||
"__tests__/acting-account-boundary-guard.test.ts": 7,
|
||||
@@ -1474,7 +1474,7 @@
|
||||
"hooks/use-account-switch.ts": 2,
|
||||
"hooks/use-ai-capability.ts": 3,
|
||||
"hooks/use-ai-run.ts": 1,
|
||||
"hooks/use-auth.ts": 34,
|
||||
"hooks/use-auth.ts": 33,
|
||||
"hooks/use-chart-domain-stats.ts": 1,
|
||||
"hooks/use-chart-overlay-prefs.ts": 2,
|
||||
"hooks/use-coach-message-results.ts": 1,
|
||||
|
||||
Reference in new issue
Block a user