mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
handle browser ngOnInit
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user