[Question]: Require login every time refresh #572
-
Contact DetailsNo response What is your question?why every time I refresh the web, login required? what should I config? More Detailsand if there is any way to disable user auth system? What is the main subject of your question?User System/OAuth ScreenshotsNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 24 replies
-
This is not the behavior of the app. It's probably due to your cookie handling on your browser.
Yes, you can disable user registration once you are signed up. You can't disable the authentication system altogether: https://docs.librechat.ai/features/user_auth_system.html#disable-user-registration |
Beta Was this translation helpful? Give feedback.
-
I know what's going on now after thinking about this more. It's related to this: #471 @fuegovic @anes300 @SailFlorve The cookies are set to secure in "production" mode, which is the default when you run the server. According to expressjs docs:
I forget this because they are still sent in a localhost environment. Without cookies, you need to login every time. After I merge this PR, you can run the cookies in the insecure mode by running Related PR: #1088 Please confirm this works |
Beta Was this translation helpful? Give feedback.
-
Having the OP issue on my Unraid server using docker. Does anyone know how to apply the above fix in Unraid? |
Beta Was this translation helpful? Give feedback.
-
I have to use
with
|
Beta Was this translation helpful? Give feedback.
-
You can simply setup Nginx as reverse proxy and create self signed certiciates. This will work no matter what and is independent if you run LC via docker or npm. |
Beta Was this translation helpful? Give feedback.
-
I still having this issue, I'm running on docker for my local machine so I don't care anything, at this moment I just want it keeps logged in if I close my tab or refresh the browser. Here is my current config which not working:
Any help would be appreciated, thanks in advance. Why I need this |
Beta Was this translation helpful? Give feedback.
I know what's going on now after thinking about this more. It's related to this: #471
@fuegovic @anes300 @SailFlorve
The cookies are set to secure in "production" mode, which is the default when you run the server. According to expressjs docs:
I forget this because they are still sent in a localhost environment. Without cookies, you need to login every time.
After I merge this PR, you can run the cookies in the insecure mode by running
npm run backend:dev
to start the app. For docker, you change the NODE_ENV in the compose file todevelopment
Related PR: #1088
Please confirm this works