- this.authService.login(username, null, token)
- .subscribe(
- () => this.redirectService.redirectToPreviousRoute(),
+ this.authService.login({ username, password: null, token })
+ .subscribe({
+ next: () => {
+ const redirectUrl = this.storage.getItem(LoginComponent.SESSION_STORAGE_REDIRECT_URL_KEY)
+ if (redirectUrl) {
+ this.storage.removeItem(LoginComponent.SESSION_STORAGE_REDIRECT_URL_KEY)
+ return this.router.navigateByUrl(redirectUrl)
+ }