coderaiser / cloudcmd

✨☁️📁✨ Cloud Commander file manager for the web with console and editor.
https://cloudcmd.io
MIT License
1.83k stars 257 forks source link

logout working in microsoft edge, but not in firefox #416

Closed godfuture closed 2 months ago

godfuture commented 2 months ago

Clicking on "logout" does work on Microsoft Edge, but when doing the same thing with firefox, no logout happens, but simply a refresh of website.

coderaiser commented 2 months ago

There is a bug in firefox https://bugzilla.mozilla.org/show_bug.cgi?id=260839, you better write there.

While this is not fixed you can use url: http://a:b@localhost:8000/ as a workaround.

antoniovalenzuela commented 1 month ago

It's not the best idea...I edited it directly

/usr/local/lib/node_modules/cloudcmd/dist/cloudcmd.js

And replace: this -> document.location.reload() for -> window.location.replace("https://logout@"+location.host+"/cloudcmd") //My custom Nginx Proxy Pass URL

this.logOut=async()=>{const t=n.prefix+"/logout",{prefix:r}=n;await e.Storage.clear(),p(r),e.load.ajax({url:t,error:()=>window.location.replace("https://logout@"+location.host+"/cloudcmd")})

Log Out imagen

Logoff, prompt login imagen

coderaiser commented 1 month ago

I tried that, it caches requests and shows a couple logins at once, so it doesn’t looks like clean solution.

coderaiser commented 1 month ago

Anyways you can add this lines to User Menu and you will have a custom logout feature for FireFox.

antoniovalenzuela commented 1 month ago

I don't have that problem. After the change, I checked the operation also in Chrome, Edge, because it could affect, but no, all browsers log out, and then I log in again without problems.

They could look for a definitive solution, compatible with all browsers.

antoniovalenzuela commented 1 month ago

I tried that, it caches requests and shows a couple logins at once, so it doesn’t looks like clean solution.

Now I understand, the loop occurs in the same tab.