i've deployed my application on vercel and when i'm successfully loggedin than it get redirected to...
a
i've deployed my application on vercel and when i'm successfully loggedin than it get redirected to https://localhost:3000 how can i change this?? app config
Copy code
export const appInfo = {
  appName: "
 Dashboard",
  apiDomain: process.env.NEXT_PUBLIC_BACKEND_BASE_URL!,
  websiteDomain: process.env.NEXT_PUBLIC_WEB_SITE_DOMAIN!,
  apiBasePath: "/auth/public/",
  websiteBasePath: "/auth",
};
i have also change env NEXT_PUBLIC_WEB_SITE_DOMAIN on vercel
r
hey @abhaybisht2002 correctly set the frontend's websiteDomain
a
still this is redirecting to localhost:3000
@rp_st is this creating issue??
Copy code
js
                getRedirectionURL: async (context) => {
                    if (context.action === "SUCCESS") {
                        if (context.redirectToPath !== undefined) {
                            return context.redirectToPath;
                        }
                        if (context.isNewPrimaryUser) {
                            return "/auth"
                        } else {
                            return "/";
                        }
                    }
                    return undefined
                },
@rp please help
@rp_st
r
i dont think so. The only reason for this is that the websiteDomain is not correctly set. Please double check
a
I did checked it twice Is there any chance that backend is redirecting it to localhost??
r
nope
you should enable frontend debug logs and see what the value of websiteDomain is in the logs
and can share with me
a
in localenv it's giving http://localhost:3000 but i changed that on vercel env
should i replace it with deployment url or production build url on vercel??
@rp_st
Copy code
JS
export const appInfo = {
  appName: "Dashboard",
  apiDomain: process.env.NEXT_PUBLIC_BACKEND_BASE_URL!,
  websiteDomain: process.env.NEXT_PUBLIC_WEB_SITE_DOMAIN!,
  apiBasePath: "/auth/public/",
  websiteBasePath: "/auth",
};
why this error is comming?
@jscyo
r
Hey @abhaybisht2002 you need to configure the right value for websiteDomain. That’s all I can help here. Sorry.
a
okayy got it
3 Views