Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

formdata instead of json()

Steven Tey2a2f89c0fb95
diff --git a/apps/web/app/api/auth/saml/callback/route.ts b/apps/web/app/api/auth/saml/callback/route.ts
index 87457a6f25..5b95795d91 100644
--- a/apps/web/app/api/auth/saml/callback/route.ts
+++ b/apps/web/app/api/auth/saml/callback/route.ts
@@ -4,13 +4,14 @@ import { redirect } from "next/navigation";
export async function POST(req: Request) {
const { oauthController } = await jackson();
- const body = await req.json();
+ const formData = await req.formData();
- const { RelayState, SAMLResponse } = body;
+ const RelayState = formData.get("RelayState");
+ const SAMLResponse = formData.get("SAMLResponse");
const { redirect_url } = await oauthController.samlResponse({
- RelayState,
- SAMLResponse,
+ RelayState: RelayState as string,
+ SAMLResponse: SAMLResponse as string,
});
if (!redirect_url) {