// post-login URL
let url: string = this.auth.redirectUrl || '/staff/splash';
- // prevent sending the user back to the login page or looping
- // back to the workstation removal page.
- if (url.startsWith('/staff/login') ||
- url.startsWith('/staff/admin/workstation/workstations/remove/')) {
+ // prevent sending the user back to the login page
+ if (url.startsWith('/staff/login')) {
url = '/staff/splash';
}
if (this.auth.workstationState === AuthWsState.NOT_FOUND_SERVER) {
// User attempted to login with a workstation that is
// unknown to the server. Redirect to the WS admin page.
+ // Reset the WS state to avoid looping back to WS removal
+ // page before the new workstation can be activated.
+ this.auth.workstationState = AuthWsState.PENDING;
this.router.navigate(
[`/staff/admin/workstation/workstations/remove/${workstation}`]);
} else {