-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logout on browser reload (dsAuthInfo
cookie is lost)
#3963
Comments
@tdonohue @atarix83 @kshepherd I'm able to reproduce the logout issue with the communities compose and dockerfiles. I use a Mac with Apple Silicon on macOS 14.6.1, Docker Desktop 27.4.0. |
I was able to reproduce this error by following exactly the instructions @pnbecker gave, but it didn't occur, when I used our production deployment setting (aka pm2... and apache proxy). I'm not sure, if this is the only difference between those scenarios. I think the logout, is because no authentication cookie is created during login. This is something, I saw, when I compared all cookies created in the two scenarios. Perhaps it helps a bit to identify the problem. |
One additional note is that as long as you don't reload / redirect the browser, you can use DSpace as the authenticated user OK, so the authentication process itself succeeds and the cookie exists, but something invalidates the session. (most of my own testing is done in dev mode so i'm running the entire application client-side) |
@pnbecker and @kshepherd : Using the exact steps listed above, I can reproduce this issue, but only on a brand new installation of DSpace. It looks to me that the issue is that the
I've also found a way to stop the issue from happening. It seems like it's related to the "Cookie Settings" in DSpace.
It seems to be a problem in initializing the Cookie Settings in Orejime (newly added in DSpace 9). So, it's likely related to #3199 (created by @AndreaBarbasso). If your Orejime cookie settings are not initialized, somehow the It might also have to do with Orejime's default behavior of hiding the Cookie Settings if there's nothing you can change. Maybe this behavior is causing our I'm not exactly sure where the bug is in our code, but this is the cause of the issue as far as I can see. I'm flagging this a "needs volunteer". I'm not sure I'll have time to find a fix, but hopefully someone else can. It definitely seems like this bug is specific to pre-9.0, and doesn't impact 8.x or 7.6.x. |
dsAuthInfo
cookie is lost)
Describe the bug
When I build DSpace from the current main branch (as of Feb. 6th, 2025: backend: f4bac3781e ; frontend: 8184acc) using the Dockerfiles and docker-compose files from the community, create an account, login via the webui and reload my browser, I'm being logged out.
To Reproduce
Steps to reproduce the behavior:
docker compose -p foo -f docker/docker-compose.yml build --pull --no-cache
in the frontend source directorydocker compose -p foo -f docker-compose.yml build --pull --no-cache
in the backend source directorydocker compose -p foo -f docker-compose.yml -f dspace/src/main/docker-compose/docker-compose-angular.yml up -d
docker compose -p foo -f docker-compose.yml -f dspace/src/main/docker-compose/docker-compose-angular.yml exec dspace /bin/bash
and call/dspace/bin/dspace create-administrator
to create an accountExpected behavior
When I login into dspace and reload in the browser, I should still be logged in.
The text was updated successfully, but these errors were encountered: