From e6aaa6556356bc4c5b13a32a1d08f93f67d5c334 Mon Sep 17 00:00:00 2001 From: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:53:24 -0500 Subject: [PATCH] fix(New-UI-Login-SSO): [Auth/PM-18693] LoginComp - fix form validation not showing up on SSO click (#13601) --- libs/auth/src/angular/login/login.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libs/auth/src/angular/login/login.component.ts b/libs/auth/src/angular/login/login.component.ts index 47109b00bbb..a84fb93bd23 100644 --- a/libs/auth/src/angular/login/login.component.ts +++ b/libs/auth/src/angular/login/login.component.ts @@ -629,12 +629,7 @@ export class LoginComponent implements OnInit, OnDestroy { * Handle the SSO button click. */ async handleSsoClick() { - // Make sure the email is not empty, for type safety const email = this.formGroup.value.email; - if (!email) { - this.logService.error("Email is required for SSO"); - return; - } // Make sure the email is valid const isEmailValid = await this.validateEmail(); @@ -642,6 +637,12 @@ export class LoginComponent implements OnInit, OnDestroy { return; } + // Make sure the email is not empty, for type safety + if (!email) { + this.logService.error("Email is required for SSO"); + return; + } + // Save the email configuration for the login component await this.saveEmailSettings();