From 182ff6481dcbd928f1df2fb16c8a381eb611b7b0 Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Wed, 26 Feb 2025 21:49:48 -0500 Subject: [PATCH] Remove early return from redirect initialization. (#13585) --- libs/auth/src/angular/sso/sso.component.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/auth/src/angular/sso/sso.component.ts b/libs/auth/src/angular/sso/sso.component.ts index cd3429323b5..cc9e5f83c01 100644 --- a/libs/auth/src/angular/sso/sso.component.ts +++ b/libs/auth/src/angular/sso/sso.component.ts @@ -155,13 +155,6 @@ export class SsoComponent implements OnInit { return; } - // Detect if we are on the first portion of the SSO flow - // and have been sent here from another client with the info in query params - if (this.hasParametersFromOtherClientRedirect(qParams)) { - this.initializeFromRedirectFromOtherClient(qParams); - return; - } - // Detect if we have landed here but only have an SSO identifier in the URL. // This is used by integrations that want to "short-circuit" the login to send users // directly to their IdP to simulate IdP-initiated SSO, so we submit automatically. @@ -172,8 +165,15 @@ export class SsoComponent implements OnInit { return; } - // If we're routed here with no additional parameters, we'll try to determine the - // identifier using claimed domain or local state saved from their last attempt. + // Detect if we are on the first portion of the SSO flow + // and have been sent here from another client with the info in query params. + // If so, we want to initialize the SSO flow with those values. + if (this.hasParametersFromOtherClientRedirect(qParams)) { + this.initializeFromRedirectFromOtherClient(qParams); + } + + // Try to determine the identifier using claimed domain or local state + // persisted from the user's last login attempt. await this.initializeIdentifierFromEmailOrStorage(); }