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.

Fix login does not automatically redirect

Kiran K8b1e016097f0
diff --git a/apps/web/ui/auth/login/email-sign-in.tsx b/apps/web/ui/auth/login/email-sign-in.tsx
index 3648c4acfa..1848c4738a 100644
--- a/apps/web/ui/auth/login/email-sign-in.tsx
+++ b/apps/web/ui/auth/login/email-sign-in.tsx
@@ -84,8 +84,8 @@ export const EmailSignIn = () => {
signIn(provider, {
email,
redirect: false,
+ callbackUrl: next || "/",
...(password && { password }),
- ...(next ? { callbackUrl: next } : {}),
}).then((res) => {
if (!res) return;