handle browser ngOnInit
This commit is contained in:
parent
3c68fb0876
commit
81a623d998
|
@ -1,3 +1,9 @@
|
||||||
import { DefaultLoginService, LoginService } from "@bitwarden/auth/angular";
|
import { DefaultLoginService, LoginService } from "@bitwarden/auth/angular";
|
||||||
|
|
||||||
export class ExtensionLoginService extends DefaultLoginService implements LoginService {}
|
import { flagEnabled } from "../../../platform/flags"; // TODO-rr-bw: do I need a client specific `flagEnabled()` fn?
|
||||||
|
|
||||||
|
export class ExtensionLoginService extends DefaultLoginService implements LoginService {
|
||||||
|
getShowPasswordlessFlag(): boolean {
|
||||||
|
return flagEnabled("showPasswordless");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -127,6 +127,12 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
|
||||||
this.showResetPasswordAutoEnrollWarning = orgPolicies?.isPolicyAndAutoEnrollEnabled;
|
this.showResetPasswordAutoEnrollWarning = orgPolicies?.isPolicyAndAutoEnrollEnabled;
|
||||||
this.enforcedPasswordPolicyOptions = orgPolicies?.enforcedPasswordPolicyOptions;
|
this.enforcedPasswordPolicyOptions = orgPolicies?.enforcedPasswordPolicyOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.clientType === ClientType.Browser) {
|
||||||
|
if (this.showPasswordless) {
|
||||||
|
await this.validateEmail();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
|
|
Loading…
Reference in New Issue