Google oauth login broke after pushing to vercel and deploying

i checked the oauth settings and the vercel variables Error 400: invalid_request
Request details: redirect_uri=undefined/api/auth/callback/google flowName=GeneralOAuthFlow

right now when doing oauth login with google it gives me that above error

i set up the urls in google and double checked they match and set up the env vars in vercel unless i’m missing one?

I’m using nextjs with vercel and Lucia for auth

Definitely double check that there are no environment variables that are invalid or missing from your Vercel project settings. That’s a common cause. Also check that you have the auth solution configured to work with your production domain

1 Like

thanks, figured it out!. I needed to do an update to my auth.ts to use APP_URL and then add it to vercel!
much appreciated for the thoughts.

1 Like

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