diff --git a/libs/auth/src/angular/sso/sso.component.ts b/libs/auth/src/angular/sso/sso.component.ts index 41cbc77e792..b3f0d7d6a66 100644 --- a/libs/auth/src/angular/sso/sso.component.ts +++ b/libs/auth/src/angular/sso/sso.component.ts @@ -367,7 +367,7 @@ export class SsoComponent implements OnInit { codeVerifier, redirectUri, orgSsoIdentifier, - email, + email ?? undefined, ); this.formPromise = this.loginStrategyService.logIn(credentials); const authResult = await this.formPromise; diff --git a/libs/common/src/auth/abstractions/sso-login.service.abstraction.ts b/libs/common/src/auth/abstractions/sso-login.service.abstraction.ts index 3dbaf429edb..b30739d94a8 100644 --- a/libs/common/src/auth/abstractions/sso-login.service.abstraction.ts +++ b/libs/common/src/auth/abstractions/sso-login.service.abstraction.ts @@ -11,7 +11,7 @@ export abstract class SsoLoginServiceAbstraction { * @see https://datatracker.ietf.org/doc/html/rfc7636 * @returns The code verifier used for SSO. */ - abstract getCodeVerifier: () => Promise; + abstract getCodeVerifier: () => Promise; /** * Sets the code verifier used for SSO. * @@ -31,7 +31,7 @@ export abstract class SsoLoginServiceAbstraction { * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1 * @returns The SSO state. */ - abstract getSsoState: () => Promise; + abstract getSsoState: () => Promise; /** * Sets the value of the SSO state. * @@ -48,7 +48,7 @@ export abstract class SsoLoginServiceAbstraction { * Do not use this value outside of the SSO login flow. * @returns The user's organization identifier. */ - abstract getOrganizationSsoIdentifier: () => Promise; + abstract getOrganizationSsoIdentifier: () => Promise; /** * Sets the value of the user's organization sso identifier. * @@ -61,7 +61,7 @@ export abstract class SsoLoginServiceAbstraction { * Note: This should only be used during the SSO flow to identify the user that is attempting to log in. * @returns The user's email. */ - abstract getSsoEmail: () => Promise; + abstract getSsoEmail: () => Promise; /** * Sets the user's email. * Note: This should only be used during the SSO flow to identify the user that is attempting to log in. diff --git a/libs/common/src/auth/services/sso-login.service.ts b/libs/common/src/auth/services/sso-login.service.ts index b77e31dc79a..9b4b8656782 100644 --- a/libs/common/src/auth/services/sso-login.service.ts +++ b/libs/common/src/auth/services/sso-login.service.ts @@ -73,7 +73,7 @@ export class SsoLoginService implements SsoLoginServiceAbstraction { this.ssoEmailState = this.stateProvider.getGlobal(SSO_EMAIL); } - getCodeVerifier(): Promise { + getCodeVerifier(): Promise { return firstValueFrom(this.codeVerifierState.state$); } @@ -81,7 +81,7 @@ export class SsoLoginService implements SsoLoginServiceAbstraction { await this.codeVerifierState.update((_) => codeVerifier); } - getSsoState(): Promise { + getSsoState(): Promise { return firstValueFrom(this.ssoState.state$); } @@ -89,7 +89,7 @@ export class SsoLoginService implements SsoLoginServiceAbstraction { await this.ssoState.update((_) => ssoState); } - getOrganizationSsoIdentifier(): Promise { + getOrganizationSsoIdentifier(): Promise { return firstValueFrom(this.orgSsoIdentifierState.state$); } @@ -97,7 +97,7 @@ export class SsoLoginService implements SsoLoginServiceAbstraction { await this.orgSsoIdentifierState.update((_) => organizationIdentifier); } - getSsoEmail(): Promise { + getSsoEmail(): Promise { return firstValueFrom(this.ssoEmailState.state$); }