Debian Dev4 8d5e32fb79
Some checks failed
build-and-push-ext / build_push (push) Failing after 5s
feat(idnot): loginWithIdNot utilise /api/v1/idnot/state et ajoute state à l’URL authorize
2025-09-23 07:15:54 +00:00

25 lines
961 B
TypeScript

import LoginCallBack from "@Front/Components/Layouts/LoginCallback";
import { useEffect } from "react";
export default function Route() {
useEffect(() => {
if (typeof window !== "undefined") {
const origin = window.location.origin;
const search = window.location.search || "";
// Forcer HTTPS et domaine dev4 après retour ID.not
if (!origin.startsWith("https://dev4.4nkweb.com")) {
const target = `https://dev4.4nkweb.com/lecoffre/authorized-client${search}`;
window.location.replace(target);
return;
}
if (origin.startsWith("http://dev3.4nkweb.com")) {
const search = window.location.search || "";
const target = `https://dev4.4nkweb.com/lecoffre/authorized-client${search}`;
window.location.replace(target);
}
}
}, []);
return <LoginCallBack />;
}