Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM-3210 - TDE - LoginWithDevice - view login options routing fix #5982

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/desktop/src/auth/login/login-with-device.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h4>{{ "fingerprintPhraseHeader" | i18n }}</h4>
<div class="sub-options another-method">
<p class="no-margin description-text">
{{ "needAnotherOption" | i18n }}
<a type="button" class="text text-primary" (click)="goToLogin()">
<a type="button" class="text text-primary" (click)="back()">
{{ "viewAllLoginOptions" | i18n }}
</a>
</p>
Expand Down Expand Up @@ -58,7 +58,7 @@ <h4>{{ "fingerprintPhraseHeader" | i18n }}</h4>
<div class="sub-options another-method">
<p class="no-margin description-text">
{{ "troubleLoggingIn" | i18n }}
<a type="button" class="text text-primary" (click)="goToLogin()">
<a type="button" class="text text-primary" (click)="back()">
{{ "viewAllLoginOptions" | i18n }}
</a>
</p>
Expand Down
19 changes: 5 additions & 14 deletions apps/desktop/src/auth/login/login-with-device.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Location } from "@angular/common";
import { Component, OnDestroy, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
import { Router } from "@angular/router";

Expand Down Expand Up @@ -54,7 +55,8 @@ export class LoginWithDeviceComponent
stateService: StateService,
loginService: LoginService,
deviceTrustCryptoService: DeviceTrustCryptoServiceAbstraction,
authReqCryptoService: AuthRequestCryptoServiceAbstraction
authReqCryptoService: AuthRequestCryptoServiceAbstraction,
private location: Location
) {
super(
router,
Expand Down Expand Up @@ -106,18 +108,7 @@ export class LoginWithDeviceComponent
super.ngOnDestroy();
}

goToLogin() {
switch (this.state) {
case this.StateEnum.StandardAuthRequest:
this.router.navigate(["/login"]);

break;
case this.StateEnum.AdminAuthRequest:
this.router.navigate(["/login-initiated"]);
break;

default:
break;
}
back() {
this.location.back();
}
}
Loading