Callback Url working locally but not working in vercel deployment

Hi guys, I am using NextAuth and providing callback conditionally on the basis of query params, the callback url is working fine in localhost but not in vercel prod, Here's a gist of my code
const getUrl = () => {
if (router.query.source === 'invitation') {
return `${backendGetCurrentBaseUrl()}/`;
}
return `${backendGetCurrentBaseUrl()}/launch`;
};
const getUrl = () => {
if (router.query.source === 'invitation') {
return `${backendGetCurrentBaseUrl()}/`;
}
return `${backendGetCurrentBaseUrl()}/launch`;
};
backendGetCurrentBaseUrl() functions returns url according to the env prod/dev Here's a snapshot of the sign in function
1 Reply
JacobMGEvans
JacobMGEvans2y ago
If no one else helps out, I might come back to this. Let me know if you figure it out so we can close this.
Want results from more Discord servers?
Add your server