Skip to content

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

Draft
kulmann wants to merge 1 commit into
mainfrom
fix/guest-session-kept-on-user-routes
Draft

kulmann wants to merge 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 opened a route that needs a user (e.g. a user-only app or an IdP route), the guest session was ended or marked as expired, so the guest lost access to their shares and was sent to the login.

Now the guest session is kept and the guest is redirected to their shares instead:

  • active guest session → redirect to the guest shares
  • expired guest session → renew the guest link, then continue to the guest shares
  • guest session that could not be restored → resume via the renew flow, then continue to the guest shares
  • no guest session, or no guest shares route available → login as before

How Has This Been Tested?

  • test environment: unit tests (Vitest)
  • test case 1: setupAuthGuard redirects user/IdP/app routes to the guest shares for an active guest context
  • test case 2: setupAuthGuard renews an expired or unavailable guest session into the guest shares
  • test case 3: setupAuthGuard falls back to the login without a guest session or without the guest shares route
  • test case 4: authService restores instead of expiring the guest session on routes that need a user, and clears it once a user is signed in

@kulmann kulmann self-assigned this Oct 30, 2026
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.

1 participant