Skip to content

fix: keep the guest session when a guest opens a route that needs a user - #4086

Merged
kulmann merged 1 commit into
mainfrom
fix/guest-session-kept-on-user-routes
Nov 3, 2026
Merged

kulmann merged 1 commit into
mainfrom
fix/guest-session-kept-on-user-routes

Conversation

@kulmann

@kulmann kulmann commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Description

When a guest with an active session opened a route that needs a user (e.g. a user-only app or an IdP route), the guest session was ended, so the guest lost access to their shares and was sent to the login.

Now an active guest session is kept and the guest is redirected to their shares instead. All other cases behave as before:

  • active guest session → redirect to the guest shares
  • no active guest session (e.g. persisted only, expired or not restorable), or no guest shares route available → guest session is ended and the login is shown as before

How Has This Been Tested?

  • test environment: unit tests (Vitest)
  • test case 1: setupAuthGuard redirects user/IdP routes to the guest shares for an active guest session
  • test case 2: setupAuthGuard falls back to the login without a guest session or without the guest shares route
  • test case 3: setupAuthGuard prefers a signed-in user over a guest session
  • test case 4: authService keeps an active guest session on user/IdP routes instead of ending it

@kulmann kulmann self-assigned this Oct 30, 2026
@kulmann
kulmann marked this pull request as ready for review November 2, 2026 09:59
@kulmann
kulmann force-pushed the fix/guest-session-kept-on-user-routes branch from 1bb1074 to 4156926 Compare November 3, 2026 08:35

@JammingBen JammingBen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kulmann
kulmann merged commit cbbca0c into main Nov 3, 2026
28 checks passed
@kulmann
kulmann deleted the fix/guest-session-kept-on-user-routes branch November 3, 2026 13:48
@openclouders openclouders mentioned this pull request Nov 3, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants