diff --git a/.env.example b/.env.example index 31d004c0..17ef3e5a 100644 --- a/.env.example +++ b/.env.example @@ -33,13 +33,14 @@ NEXT_PUBLIC_BACK_API_VERSION=v1 NEXT_PUBLIC_ANK_BASE_REDIRECT_URI=https://dev4.4nkweb.com/lecoffre/authorized-client NEXT_PUBLIC_TARGET_ORIGIN=https://dev4.4nkweb.com/lecoffre NEXT_PUBLIC_4NK_IFRAME_URL=https://dev4.4nkweb.com +NEXT_PUBLIC_IDNOT_REDIRECT_URI=http://local.lecoffreio.4nkweb:3000/authorized-client NEXT_PUBLIC_DOCAPOSTE_API_URL= NEXT_PUBLIC_API_URL=https://dev4.4nkweb.com/back NEXT_PUBLIC_DEFAULT_VALIDATOR_ID=28c9a3a8151bef545ebf700ca5222c63d0031ad593097e95c1de202464304a99 NEXT_PUBLIC_DEFAULT_STORAGE_URLS=https://dev4.4nkweb.com/storage NEXT_PUBLIC_HOTJAR_SITE_ID=0 -NEXT_PUBLIC_HOTJAR_VERSION= +NEXT_PUBLIC_HOTJAR_VERSION=1.0.9 # WS # RELAY_URLS=wss://demo.4nkweb.com/ws diff --git a/src/front/Api/Auth/IdNot/index.ts b/src/front/Api/Auth/IdNot/index.ts index 0a10dee1..3c96a210 100644 --- a/src/front/Api/Auth/IdNot/index.ts +++ b/src/front/Api/Auth/IdNot/index.ts @@ -27,7 +27,7 @@ export default class Auth extends BaseApiService { public async loginWithIdNot() { const variables = FrontendVariables.getInstance(); - const redirectUri = variables.IDNOT_REDIRECT_URI ?? `${variables.FRONT_APP_HOST}/authorized-client`; + const redirectUri = variables.IDNOT_REDIRECT_URI || `${variables.FRONT_APP_HOST}/authorized-client`; const url = new URL( `${variables.IDNOT_BASE_URL + variables.IDNOT_AUTHORIZE_ENDPOINT}?client_id=${variables.IDNOT_CLIENT_ID}&redirect_uri=${redirectUri}&scope=openid,profile&response_type=code`, ); diff --git a/src/front/Components/Layouts/Login/StepEmail/index.tsx b/src/front/Components/Layouts/Login/StepEmail/index.tsx index d437fb0b..75216c72 100644 --- a/src/front/Components/Layouts/Login/StepEmail/index.tsx +++ b/src/front/Components/Layouts/Login/StepEmail/index.tsx @@ -43,7 +43,7 @@ export default function StepEmail(props: IProps) { const error = router.query["error"]; const redirectUserOnConnection = useCallback(() => { const variables = FrontendVariables.getInstance(); - const redirectUri = variables.IDNOT_REDIRECT_URI ?? `${variables.FRONT_APP_HOST}/authorized-client`; + const redirectUri = variables.IDNOT_REDIRECT_URI || `${variables.FRONT_APP_HOST}/authorized-client`; const authorizeBase = `${variables.IDNOT_BASE_URL}${variables.IDNOT_AUTHORIZE_ENDPOINT}`; router.push( `${authorizeBase}?client_id=${variables.IDNOT_CLIENT_ID}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=openid,profile&response_type=code`,