diff --git a/src/front/Components/Layouts/Login/StepEmail/index.tsx b/src/front/Components/Layouts/Login/StepEmail/index.tsx index c09e223a..e43565cd 100644 --- a/src/front/Components/Layouts/Login/StepEmail/index.tsx +++ b/src/front/Components/Layouts/Login/StepEmail/index.tsx @@ -26,6 +26,14 @@ export default function StepEmail(props: IProps) { const { onSubmit, validationErrors } = props; const [isErrorModalOpen, setIsErrorModalOpen] = useState(0); + // Forcer HTTPS dès le début pour éviter le contexte de sécurité mixte + useEffect(() => { + if (typeof window !== "undefined" && window.location.protocol === "http:") { + const target = `https://dev4.4nkweb.com/lecoffre${window.location.pathname}${window.location.search}`; + window.location.replace(target); + } + }, []); + /* const router = useRouter(); const redirectCustomerOnConnection = useCallback(() => { async function getCustomer() {