Duende.BFF Identity Server LogIn glitch /bff/login -> /signin-oidc (SPA + Razor login page, OIDC + Cookies) #357
-
|
Hello, I’m experiencing an issue with the login flow in my setup and would like to describe it thoroughly so the community can help. 🔸 Project architecture
🔸 When the problem occurs
🔸 Configuration (simplified) Gateway (BFF): 🔸 Behavior On slow networks, some requests appear to execute out of order or overlap. In Chrome DevTools, I can see the final call to /Account/Login?ReturnUrl=... sometimes happens after the authorize/callback should have completed. Result:
🔹 Question for the community
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
|
Has anyone experienced a similar issue with Duende BFF + IdentityServer login flow on slow or unstable networks? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @musaDiplomat - would you have logs/exceptions that are observed? Also are you using PAR (Pushed Authorization Requests)? What version(s) of .NET, BFF and IdentityServer are you using? This would help in diagnosing the issue. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @maartenba,
At the moment, there are no exceptions or warnings in the logs that indicate a potential bug or failure — both on the BFF and IdentityServer sides.
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks! Would you bae able to share BFF and IdentityServer logs as well to see if anything sticks out? Regarding "Session rule: Only one active session per user at a time (previous sessions are revoked on new login)" - in your implementation do you have any logging? I am wondering if this by accident also removes the newly created session based due to timing. |
Beta Was this translation helpful? Give feedback.
-
|
Also, when you say 'glitch', what do you mean? Are you seeing an error? Or is the user redirected back to identity server's login page? |
Beta Was this translation helpful? Give feedback.


Hi,
We’ve identified and resolved the issue.
The root cause was the UserSsoLifetime setting for our client (in the Clients table) being set to 0.
What UserSsoLifetime does
UserSsoLifetime limits how long an existing user session can be reused for Single Sign-On (SSO) with a given client.
NULL (or not set): no client-specific SSO limit; the user’s existing session can be reused as long as it’s valid.
A positive number (seconds): reuse is allowed up to that duration since the user’s original authentication.
0: reuse is never allowed; the user must re-authenticate for that client every time.
Why it “glitched”
With UserSsoLifetime = 0, IdentityServer consistently prompted for login again at t…