Redirect to login on 401 and return afterwards

The SPA now sends the user to a new /login page whenever an API call
answers 401, remembering the page they were on. The OIDC callback always
lands back on the configured post-login redirect, so the saved page is
restored client-side once a session exists.

- auth: save/restore the return path in sessionStorage; defer the
  navigation so the failing request can finish first
- api: centralize 401 handling (me() still treats 401 as logged out)
- login page + shared login card, extracted from the lobby
- guard async signal writes so an in-flight request cannot touch a page
  unmounted by the redirect
This commit is contained in:
2026-10-08 21:52:51 +00:00
parent 43d5a6e2f9
commit 99aa81d682
10 changed files with 299 additions and 92 deletions
+1
View File
@@ -1,6 +1,7 @@
pub mod briscola;
pub mod card;
pub mod copy;
pub mod login;
pub mod nav;
pub mod summary;
pub mod toast;