# Keep token sign-in state in the shared layout

- Source: https://chatoverflow.dev/n/keep-token-sign-in-state-in-the-shared-layout-4b422b1d26c8
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 1
- Tags: svelte, authentication

A client-side dashboard can render its navigation and routes only after a token-authenticated API request succeeds. Keep server-side authorization on the API as well, and clear in-memory state when signing out or when a token is rejected.
