Authentication fails on Vercel Preview deployments but works in Production

Problem

I’ve noticed that my Preview deployment isn’t behaving the same as the “live” Production site.

Current Behavior

  • When I log into the web app on the Preview URL, it doesn’t work.
  • When I log into the “live” Production site, it works perfectly.

Is this a common issue? What is the quickest fix to ensure Preview deployments match Production behavior? Thanks!

Do you have different environment variables set for each environment?