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.

Update redirect callback comment

Rafia3ffd77ed156
diff --git a/apps/web/lib/auth/options.ts b/apps/web/lib/auth/options.ts
index 49f3d1aaa8..c5f4b74cf0 100644
--- a/apps/web/lib/auth/options.ts
+++ b/apps/web/lib/auth/options.ts
@@ -531,8 +531,8 @@ export const authOptions: NextAuthOptions = {
}
return true;
},
- // baseUrl is always NEXTAUTH_URL (app.dub.co), so resolve against the
- // request's host instead to support redirects on partners.dub.co
+ // baseUrl is NEXTAUTH_URL when it is set (e.g. on localhost), so resolve
+ // against the request's host instead to support redirects on partners
redirect: async ({ url, baseUrl }) => {
const trustedOrigins = [baseUrl, APP_DOMAIN, PARTNERS_DOMAIN];
const host = (await headers()).get("host");