Skip to content
Discussion options

You must be logged in to vote

This is not a bug in the LibreChat codebase itself, but rather an expected behavior when using session-based authentication in a distributed environment without proper session management.

What you're experiencing is a common challenge in horizontally scaled applications:

  1. The first request creates an authentication session on instance A
  2. The load balancer routes the callback to instance B
  3. Instance B doesn't have access to the session data created on instance A

This is a fundamental architectural consideration rather than a code defect. In distributed systems with stateful authentication flows, you need one of the following:

  1. Sticky sessions (as you've noted in workarounds)
  2. Distributed ses…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@STeveShary
Comment options

Answer selected by STeveShary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #7451 on May 19, 2025 15:33.