feat: update build for react router v8

This commit is contained in:
Aarnav Tale
2026-06-20 12:09:42 -04:00
parent 0c4d175eb7
commit 3f9dcd5eb4
7 changed files with 1448 additions and 1293 deletions
+1 -2
View File
@@ -7,13 +7,12 @@ import { createOidcStateCookie } from "~/utils/oidc-state";
import type { Route } from "./+types/oidc-callback";
export async function loader({ request, context }: Route.LoaderArgs) {
export async function loader({ request, context, url }: Route.LoaderArgs) {
if (context.oidc.state !== "enabled") {
throw data(`OIDC is unavailable: ${context.oidc.reason}`, { status: 501 });
}
const service = context.oidc.value;
const url = new URL(request.url);
if (url.searchParams.toString().length === 0) {
return redirect("/login?s=error_no_query");
}