After the changes made to subscriptions, redirecting to the dummy logout page
no longer does anything.
So we removed the logout route and now redirect directly to the login page.
Fixes: https://tracker.ceph.com/issues/45651
Signed-off-by: Tiago Melo <tmelo@suse.com>
(cherry picked from commit
54ecfa90129989239aa66ab087cb1a8afe607735)
path: 'login-change-password',
component: LoginPasswordFormComponent,
canActivate: [NoSsoGuardService]
- },
- { path: 'logout', children: [] }
+ }
]
},
{
});
request.flush({});
expect(component.onPasswordChange).toHaveBeenCalled();
- expect(router.navigate).toHaveBeenCalledWith(['/logout']);
+ expect(router.navigate).toHaveBeenCalledWith(['/login']);
});
});
*/
onPasswordChange() {
this.notificationService.show(NotificationType.success, this.i18n('Updated user password"'));
- // Theoretically it is not necessary to navigate to '/logout' because
- // the auth token gets invalid after changing the password in the
- // backend, thus the user would be automatically logged out after the
- // next periodically API request is executed.
- this.router.navigate(['/logout']);
+ this.router.navigate(['/login']);
}
}
let service: AuthService;
let httpTesting: HttpTestingController;
- const routes: Routes = [{ path: 'logout', children: [] }];
+ const routes: Routes = [{ path: 'login', children: [] }];
configureTestBed({
providers: [AuthService, AuthStorageService],
logout(callback: Function = null) {
return this.http.post('api/auth/logout', null).subscribe((resp: any) => {
- this.router.navigate(['/logout'], { skipLocationChange: true });
+ this.router.navigate(['/login'], { skipLocationChange: true });
this.authStorageService.remove();
if (callback) {
callback();