Skip to content

Flash of LoginComponent on Page Load Due to Initial Null User State #19

@Jacksonmills

Description

@Jacksonmills

When the page loads, there is a brief flash of the LoginComponent before the user's authentication status is confirmed. This occurs because the initial state of the user in our authentication hook is set to null, and it takes a moment for the hook to update this state based on the user's session. This flash can be jarring and confusing for users who are already logged in.

Steps to Reproduce

Open the application while already logged in.
Observe that the LoginComponent briefly appears before being replaced by the main content.

Expected Behavior

The LoginComponent should not appear if the user is already authenticated and has an active session.

Actual Behavior

The LoginComponent flashes briefly on page load, even when the user is authenticated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions