From 729c3ed70c328940080ab32f06d6704e0785ad20 Mon Sep 17 00:00:00 2001 From: Martin Marosi Date: Mon, 18 Dec 2023 10:37:05 +0100 Subject: [PATCH] Keep query string in URL after redirect auth. --- src/auth/OIDCConnector/OIDCProvider.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/auth/OIDCConnector/OIDCProvider.tsx b/src/auth/OIDCConnector/OIDCProvider.tsx index 218bc3def..d91ad0076 100644 --- a/src/auth/OIDCConnector/OIDCProvider.tsx +++ b/src/auth/OIDCConnector/OIDCProvider.tsx @@ -58,7 +58,10 @@ const OIDCProvider: React.FC = ({ children }) => { response_type: 'code', response_mode: 'fragment', onSigninCallback: () => { - window.history.replaceState({}, document.title, window.location.pathname); + const startUrl = new URL(window.location.href); + // remove the SSO code params from the URL + startUrl.hash = ''; + window.history.replaceState({}, document.title, startUrl); }, userStore: new WebStorageStateStore({ store: window.localStorage }), }),