mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
refactor handlCaptchaRequired()
This commit is contained in:
@@ -173,6 +173,8 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
private async handleAuthResult(authResult: AuthResult): Promise<void> {
|
private async handleAuthResult(authResult: AuthResult): Promise<void> {
|
||||||
if (this.handleCaptchaRequired(authResult)) {
|
if (this.handleCaptchaRequired(authResult)) {
|
||||||
|
this.captchaSiteKey = authResult.captchaSiteKey;
|
||||||
|
this.captcha.init(authResult.captchaSiteKey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,13 +366,7 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private handleCaptchaRequired(authResult: AuthResult): boolean {
|
private handleCaptchaRequired(authResult: AuthResult): boolean {
|
||||||
if (Utils.isNullOrWhitespace(authResult.captchaSiteKey)) {
|
return !Utils.isNullOrWhitespace(authResult.captchaSiteKey);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.captchaSiteKey = authResult.captchaSiteKey;
|
|
||||||
this.captcha.init(authResult.captchaSiteKey);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async loadEmailSettings(): Promise<void> {
|
private async loadEmailSettings(): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user