Commit d7c88c6f authored by Nicolas Pernoud's avatar Nicolas Pernoud
Browse files

fix: redirection loop after cookie expires

parent 3d49f59a
Pipeline #14497 passed with stages
in 2 minutes and 51 seconds
......@@ -17,6 +17,15 @@ export class Login {
login_icon;
async mount(mountpoint) {
// Refresh the user, even if empty
const newUser = await Auth.GetUser();
if (IsEmpty(newUser)) {
Object.keys(this.user).forEach((key) => {
delete this.user[key];
});
} else {
Object.assign(this.user, newUser);
}
if (!IsEmpty(this.user)) {
document.getElementById(mountpoint).innerHTML = "";
location.hash = "#";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment