umi icon indicating copy to clipboard operation
umi copied to clipboard

Session being lost upon reload/open in new tab

Open FelixGrafschmidt opened this issue 3 years ago • 4 comments

If i reload the page or open a page in a new tab, my session is lost. From what I can tell the session is saved in the vuex store, maybe this could be done server-side to allow users to keep their session over mutliple tabs.

FelixGrafschmidt avatar Mar 11 '21 16:03 FelixGrafschmidt

Alternatively, if no server is available, this could also be done via localStorage.

FelixGrafschmidt avatar Nov 26 '21 19:11 FelixGrafschmidt

I resolved the issue on my local fork with the above fix. if you could test it as well it would be great

If i reload the page or open a page in a new tab, my session is lost. From what I can tell the session is saved in the vuex store, maybe this could be done server-side to allow users to keep their session over mutliple tabs.

Also, this is a pretty bad idea, Sessions can be used to do all kind of actions on crunchyroll, including giving out the premium-trials etc. I'd rather have that not stored on the server. Umi already uses the localStorage for this, which is perfectly fine. It's just that "refreshing" the page, triggers a logout procedure because of a missing or unset key in the local storage.

yowkah avatar Dec 11 '21 05:12 yowkah

I can confirm that your fork does fix the issue. I am however not familiar with this project's general structure, therefore I cannot with authority say whether or not this does not lead to any other problems.

FelixGrafschmidt avatar Dec 12 '21 11:12 FelixGrafschmidt

In that case we could also change the check to be a check for undefined. since the value gets set to null by the response of the login request.

yowkah avatar Dec 12 '21 20:12 yowkah