Enhancement: Notify a user that they are unauthorized while preserving their typed query. #3909
Replies: 1 comment 1 reply
-
As of the latest commit, we are doing a lot to counter that undesired behavior. Firstly, you can configure session expiry time however you like: https://www.librechat.ai/docs/configuration/authentication#session-expiry-and-refresh-token To truly benefit from this, you need to connect to your instance via HTTPS. Secondly, the app performs "health checks" in intervals, and if you have been inactive (off the top of my head, it's 5 or 10 min), it will check again as soon as the main textarea for chat input is active/focused (and if you spend 10 minutes writing, there would be another health check independent of the textarea happening). In other words, you should be logged out before typing anything and not while writing or after sending the request with a reasonable session expiry. What is your configuration like? Can you double check if the health checks are happening in your network tab? |
Beta Was this translation helpful? Give feedback.
-
What features would you like to see added?
I understand that this flow can be a little complicated to implement, as many apps across the web have this incredibly annoying flaw built in. It's very simple, and it goes like this:
User fills in a web form, and during the time that they've just spent typing out a lengthy, carefully-crafted message into the text box, their auth session expires, and thus upon finally submitting it, the back-end responds with a 401, and dumps them onto the login page.... throwing everything they just wrote and the last 10+ minutes of their life down the pan in the process.
Yup, LibreChat does this.
Yup, it's caught me out multiple times.
Yup, it just happened to me yet again just now.
Is there ANYTHING we could do to improve this, PLEASE.
Thank you. Otherwise a great app that I enjoy using.
More details
I think it's clear.
Which components are impacted by your request?
No response
Pictures
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions