diff --git a/src/features/AuthServiceApp/components/Login/hooks.tsx b/src/features/AuthServiceApp/components/Login/hooks.tsx index 184625a9..c611748b 100644 --- a/src/features/AuthServiceApp/components/Login/hooks.tsx +++ b/src/features/AuthServiceApp/components/Login/hooks.tsx @@ -48,6 +48,7 @@ export const useLoginForm = () => { const submitForm = () => formRef.current?.submit() const redirect_url = new URLSearchParams(location.search).get('redirect_uri') + const clientId = new URLSearchParams(location.search).get('client_id') const { client_id, @@ -58,6 +59,7 @@ export const useLoginForm = () => { } = getClientSettings() const currentRedirectUrl = redirect_url ?? redirect_uri + const currentClientId = clientId ?? client_id const handleError = (error: string) => { setAuthError(error) @@ -69,6 +71,7 @@ export const useLoginForm = () => { setIsFetching(true) try { await loginCheck( + currentClientId, email, lang, password, @@ -86,7 +89,7 @@ export const useLoginForm = () => { return { authError, - client_id, + client_id: currentClientId, email, formError, formRef, diff --git a/src/features/AuthServiceApp/requests/auth.tsx b/src/features/AuthServiceApp/requests/auth.tsx index 531b5e22..bc971374 100644 --- a/src/features/AuthServiceApp/requests/auth.tsx +++ b/src/features/AuthServiceApp/requests/auth.tsx @@ -21,20 +21,20 @@ type SuccessResponse = { } export const loginCheck = async ( + currentClientId: string | undefined, email: string, lang: string, password: string, currentRedirectUrl: string | undefined, ) => { const { - client_id, response_mode, response_type, scope, } = getClientSettings() const paramsUrl = { - client_id, + client_id: currentClientId, lang, redirect_uri: currentRedirectUrl, response_mode,