|
|
|
|
@ -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, |
|
|
|
|
|