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.

fixed samlAudience

Steven Teyb7234ce79118
diff --git a/lib/jackson.ts b/lib/jackson.ts
index 3b283cfc6c..d9b097992f 100644
--- a/lib/jackson.ts
+++ b/lib/jackson.ts
@@ -7,8 +7,8 @@ import type {
IDirectorySyncController,
} from "@boxyhq/saml-jackson";
-const samlPath = "/api/auth/saml/callback";
-const samlAudience = "https://saml.dub.sh";
+export const samlPath = "/api/auth/saml/callback";
+export const samlAudience = "https://saml.dub.co";
const opts: JacksonOption = {
externalUrl: process.env.NEXTAUTH_URL as string,
diff --git a/pages/api/projects/[slug]/saml.ts b/pages/api/projects/[slug]/saml.ts
index 21532b76f0..8f2156cb41 100644
--- a/pages/api/projects/[slug]/saml.ts
+++ b/pages/api/projects/[slug]/saml.ts
@@ -1,5 +1,5 @@
import { withProjectAuth } from "#/lib/auth";
-import jackson from "#/lib/jackson";
+import jackson, { samlAudience, samlPath } from "#/lib/jackson";
import prisma from "#/lib/prisma";
export default withProjectAuth(
@@ -15,10 +15,12 @@ export default withProjectAuth(
const response = {
connections,
- issuer: "https://saml.dub.sh",
- acs: `${process.env.NEXTAUTH_URL}/api/auth/saml/callback`,
+ issuer: samlAudience,
+ acs: `${process.env.NEXTAUTH_URL}${samlPath}`,
};
+ console.log(JSON.stringify(response, null, 2));
+
return res.status(200).json(response);
// POST /api/projects/[slug]/saml – create a new SAML connection