Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
import { redirect, type ActionFunctionArgs, type LoaderFunctionArgs } from "react-router";
|
||||
|
||||
import { validatePortalCsrfToken } from "~/services/customer-portal/portal-csrf.server";
|
||||
import { portalNotFound, requirePortalSessionIdentity, revokePortalSession } from "~/services/customer-portal/portal-data.server";
|
||||
import { clearPortalSessionCookie } from "~/services/customer-portal/portal-session-cookie.server";
|
||||
import { portalPublicPath, requireTrustedPortalOrigin } from "~/services/customer-portal/portal-origin.server";
|
||||
|
||||
export async function loader(_args: LoaderFunctionArgs) {
|
||||
throw portalNotFound();
|
||||
}
|
||||
|
||||
export async function action({ request, params }: ActionFunctionArgs) {
|
||||
const form = await request.clone().formData();
|
||||
await validatePortalCsrfToken(request, form);
|
||||
const identity = await requirePortalSessionIdentity(request, params.tenant);
|
||||
const origin = requireTrustedPortalOrigin(request, identity.tenantSlug);
|
||||
await revokePortalSession(identity, request);
|
||||
throw redirect(portalPublicPath(origin, "login"), {
|
||||
headers: { "Cache-Control": "no-store", "Set-Cookie": await clearPortalSessionCookie() },
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user