Skip to content

Refreshing a session when you have created multiple serverClients for a request results in duplicate Set-Cookie headers, can blow out header limits on CF #144

@mike-littlechapter

Description

@mike-littlechapter

essentially the title.

During an SSR request, createServerClient might be called in the auth loader, and again later in some server function or internal api.

when the client refreshes an expired session using the refresh token and calls setAllCookies to set the Set-Cookie header, there is shared state between all the current server clients, and they all add these Set-Cookie headers, leading to duplicate Set-Cookie headers for large session objects

This can rapidly blow out the response header limits of cloudfront leading to 502's when there are multiple server clients

Expected behaviour:

Only the client used to call auth.refreshSession() should call the setAllCookies method to set Set-Coookie headers with the updated session

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions