The localhost password reset trap is exactly what hit me recently. I exported a lovable project to run on my cloudways server and spent an hour trying to figure out why the auth redirects were still bouncing back to the preview URL.
It is so easy to miss those env variables when migrating.
Really interesting point on the exposed endpoints. when you do these audits, are you actually finding service_role keys baked right into the production javascript? I figured the build process would strip those out automatically by now.