## Description If any API call returns a 401, the stored JWT is invalid or expired. Automatically clear it and redirect the user to the login page. ## Deliverables - [ ] API client catches 401 responses globally - [ ] Calls `clearJwt()` to remove the stored token - [ ] Calls `walletStore.disconnectWallet()` to clear wallet state - [ ] Redirects to `/login` using Next.js `router.push` - [ ] Does not redirect for 401s on the auth endpoints themselves (`/auth/challenge`, `/auth/verify`) - [ ] `npm run build` passes ## Notes Depends on #58 (interceptor) and #74 (walletStore disconnect update).
Description
If any API call returns a 401, the stored JWT is invalid or expired. Automatically clear it and redirect the user to the login page.
Deliverables
clearJwt()to remove the stored tokenwalletStore.disconnectWallet()to clear wallet state/loginusing Next.jsrouter.push/auth/challenge,/auth/verify)npm run buildpassesNotes
Depends on #58 (interceptor) and #74 (walletStore disconnect update).