From 4625b44703f4c522b4d6182686884367f5dc22e7 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 24 Nov 2020 11:29:04 -0600 Subject: [PATCH] WIP: dirty fix to SSO web vs browser redirect logic split (#719) * WIP: dirty fix to SSO web vs browser redirect logic split * Use includes for clientId identification routing determination more robust to future state string changes Co-authored-by: Addison Beck Co-authored-by: Matt Gibson Co-authored-by: Addison Beck --- src/connectors/sso.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connectors/sso.ts b/src/connectors/sso.ts index dc3389f767..a21e5fcd67 100644 --- a/src/connectors/sso.ts +++ b/src/connectors/sso.ts @@ -5,7 +5,7 @@ document.addEventListener('DOMContentLoaded', (event) => { const code = getQsParam('code'); const state = getQsParam('state'); - if (state != null && state.endsWith(':clientId=browser')) { + if (state != null && state.includes(':clientId=browser')) { initiateBrowserSso(code, state); } else { window.location.href = window.location.origin + '/#/sso?code=' + code + '&state=' + state;