Skip to content
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

SPA usage on expired session not redirecting to login #2593

Open
james-baker opened this issue Mar 28, 2024 · 2 comments
Open

SPA usage on expired session not redirecting to login #2593

james-baker opened this issue Mar 28, 2024 · 2 comments
Labels
Module: Core Application Type: Bug A problem that impairs or prevents the functions of the product.

Comments

@james-baker
Copy link

Repro:
(presumably) Have session expire (what does it take, a few weeks? but it doesn't seem like activity continuously refreshes it? or maybe major deploys invalidate all sessions, I don't know)
Be on a standard main page (like Subscribers)
Click on a left nav link (like Emails)
Expected: If I've been logged out/expired, then send me to the login page
Actual: mess of 400 errors and similar in the web console, no visible reaction in the UI.

(If I reload the page from the URL, then I DID get sent to the login page at that time.)

@james-baker
Copy link
Author

james-baker commented Apr 18, 2024

I'm sitting inside a tab, last touched the session 6 days ago. Clicking on left nav links all over, no UI response at all.

Console just has things like "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec." tags-BQLpcI8l.js:1
(which I think just means file-not-found)

So it's hard for me to tell if this is "expired session" or "app has been updated so all URLs are broken"
EDIT: Okay further testing reveals my session is still valid this time - it's just that "all URLs are broken by app update" seems to act the same way as "your session expired". Is there still an open defect on that also?

@jmduke
Copy link
Member

jmduke commented Apr 22, 2024

Okay excellent — that was my suspicion here.

This was not true even a month ago, but Vite just shipped error handling for this which I think should solve matters:

vitejs/vite#11804 (comment)

@jmduke jmduke removed bug labels May 28, 2024
@jmduke jmduke added Type: Bug A problem that impairs or prevents the functions of the product. Module: Core Application labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Core Application Type: Bug A problem that impairs or prevents the functions of the product.
Projects
Status: No status
Status: No status
Development

No branches or pull requests

2 participants