Facing issue is Redirect_url authorization

Hello,

I’m facing a critical issue in my app. When signing up as a new user, adding payment, and authorizing with Xero, after authorization, it should redirect to the home page. However, after authorization, it’s currently redirecting to the register page again instead of the home page.

I tested this on my local environment, and everything works as expected, but in staging or production, it’s not working properly. I’m not sure why it’s redirecting to the wrong page. I’m using redirect_uri, and in that, I’ve set the auth/callback file. The same configuration works fine locally, but it’s not working in the other environments.

Could you help me identify the issue?

Thank you.

Hi, @devvgtb!

It would be helpful to see your vercel.json configuration. Could you share that with us?

Hey @pawlean

I have nothing in my vercel.json file its just one scheduler code,

Are you talking about the Enviornment variable?

Thanks,

Hey @devvgtb. I know these issues can be frustrating to solve on your own.

There’s not enough info here yet to tell us what’s causing the problem. If you can share the public repo or minimal reproducible example it would let us get more insight into how your project is set up. Then we can all work together from the same code to debug the issue.

1 Like

Hi @devvgtb - I’m also checking with colleagues to make sure we’re on the right track, but wanted to share an attempt at a solution with systematic troubleshooting steps generated by v0 (more about v0, which is like an always-on pair programmer with a chat interface that we’re building at Vercel).

Here’s the link to the systematic steps - please let us know if this gets you part of the way there…

1 Like

Hey All,

So the problem is one find statement in callback file its not executing and its not inserting the data into database.

I tried to to debug in deep, one difference in my local host or production code is nodejs version difference, Is that would affect, I am using nodejs version in my local is 20.14.0 and in vercel nodejs is 18x. I guess that’s the only thing is different and its working fine in local but not in production and if i upgrade my vercel to 20 that would affect or something on other code.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.