Web Development

Angular SSR page flashes logged-out state during hydration

Environment

Environment

Angular SSR application using cookie authentication and client hydration.

What happens

What happens

Authenticated navigation initially renders the guest header before switching to the user menu.

What I have tried

What I have tried

Moved the auth request into an initializer, but the server still renders no user.

I would appreciate advice on how to identify the root cause without risking existing data or configuration.

COMMUNITY RESPONSES

Verified community troubleshooting

0 replies

No answers yet..

Showing 0 of 0 community responses
AI DIAGNOSTICS

Incident analysis

Updated 3w ago• Trouble ID

Most likely causes

The server-side HTTP request is not receiving or forwarding the browser cookie. 72%
A recent software, firmware or configuration change is exposing an existing compatibility issue. 42%

Summary

The reported behaviour is consistent with the server-side HTTP request is not receiving or forwarding the browser cookie. The safest next step is to verify that hypothesis with a reversible test before making permanent configuration changes.

Suggested Fixes

Verify the likely cause
Forward request cookies in the SSR server context, transfer the resolved auth state and avoid issuing a duplicate client request during hydration.
Validate and monitor
Reproduce the issue once after the change, review relevant logs or metrics, and keep a rollback path until the system has remained stable.

Continue troubleshooting

Matched from the title, description and tags