This example shows how to detect a user's authenticated state client-side when using an HttpOnly cookie. This architecture supports both SSR (server-side rendering) and static optimization and is explained in this blog post. This example is also available without TypeScript.