From 93bedee02ff0eee000cb5e1fecbeac11665426c6 Mon Sep 17 00:00:00 2001 From: viehlieb Date: Fri, 23 Feb 2024 11:50:54 +0100 Subject: [PATCH] adapt redirect url to work with calculated redirect url --- src/helpers/redirectToProvider.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/helpers/redirectToProvider.ts b/src/helpers/redirectToProvider.ts index 0a32cf46b..50ca39671 100644 --- a/src/helpers/redirectToProvider.ts +++ b/src/helpers/redirectToProvider.ts @@ -11,8 +11,6 @@ export function getRedirectUrlFromCurrentFrontendPath(provider: IProvider): stri export const redirectToProvider = (provider: IProvider) => { - console.log({provider}) - const redirectUrl = getRedirectUrlFromCurrentFrontendPath(provider) const state = createRandomID(24) localStorage.setItem('state', state) @@ -21,8 +19,7 @@ export const redirectToProvider = (provider: IProvider) => { if (provider.scope !== null){ scope = provider.scope } - - window.location.href = `${provider.authUrl}?client_id=${provider.clientId}&redirect_uri=${redirectUrl}${provider.key}&response_type=code&scope=${scope}&state=${state}` + window.location.href = `${provider.authUrl}?client_id=${provider.clientId}&redirect_uri=${redirectUrl}&response_type=code&scope=${scope}&state=${state}` } export const redirectToProviderOnLogout = (provider: IProvider) => { if (provider.logoutUrl.length > 0) {