FlowFuse / flowfuse

Build bespoke, flexible, and resilient manufacturing low-code applications with FlowFuse and Node-RED
https://flowfuse.com
Other
245 stars 59 forks source link

Logged in users that manipulate the url and remove everything after the application domain land on a blank page. #4078

Closed cstns closed 1 day ago

cstns commented 5 days ago

Current Behavior

Logged in users that manipulate the url and remove everything after the application domain land on a blank page.

Expected Behavior

Users should be taken to their default team applications page

Steps To Reproduce

Log in the platform, remove everything after the application domain and press enter.

Environment

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

knolleary commented 4 days ago

I cannot reproduce this myself. When logged in, if I open a new tab to app.flowfuse.com, or edit the url in an existing tab to that, then I end up on my default team's page as expected.

cstns commented 4 days ago

Apparently It's only happening on Firefox. Did not notice it until now

cstns commented 4 days ago

I updated the description

knolleary commented 4 days ago

Hmm, working for me with Firefox as well.

cstns commented 4 days ago

That's weird.. Here's how I reproduce it consistently

https://github.com/FlowFuse/flowfuse/assets/20094749/5adaa480-26f5-4aa9-ab64-7e7965fc7065

I cannot replicate it on chrome though.

ZJvandeWeg commented 4 days ago

@cstns I ran into it with Chrome today

knolleary commented 4 days ago

Can anyone who reproduces this check the browser console for any errors?

cstns commented 4 days ago

https://github.com/FlowFuse/flowfuse/assets/20094749/5f628d35-4cbe-4c97-bef0-46122f8530a0

This ignoreSurvey.js seems to be interacting with localStorage. Might be clashing with the recent vuex persistence in localStorage ?

cstns commented 1 day ago

The redirectUrlAfterLogin url is not cleared after the redirect occurred and that causes side effects in other locations in the app. This is now a problem because we're storing the redirectUrlAfterLogin in localStorage and it doesn't get cleared on page refresh.

The fix contains a 3 part fix: