Sentiaus commented on issue #3737:
URL: https://github.com/apache/texera/issues/3737#issuecomment-3330472363
One thing I noticed, is that the `logout` function in `auth.service.ts`
properly deletes the user token and unsubscribes the expiration time, but does
not trigger userChange like the comment says it does.
```
/**
* this method will clear the saved user account and trigger
userChangeEvent
*/
public logout(): undefined {
AuthService.removeAccessToken();
this.tokenExpirationSubscription?.unsubscribe();
return undefined;
}
```
Additionally the `changeUser` function that does exist in `user.service.ts`
does not navigate the user away but actually only happens in
`user-icon.component.ts`:
```
/**
* handle the event when user click on the logout button
*/
public onClickLogout(): void {
this.userService.logout();
document.cookie = "flarum_remember=; expires=Thu, 01 Jan 1970 00:00:00
UTC; path=/;";
this.router.navigate([DASHBOARD_ABOUT]);
}
```
I believe this is fine, but definitely a negative UX when the user has been
signed out due to token expiration, as they are not actually able to tell that
they have been signed out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]