I have a Vue.js application that I am trying to mock build for production so that I can test registering of a service worker to get it so I can send notifications (useful for the app not a spam one like some sites). The issue I am having is that when I build for production I try to login in a fresh incognito browser and I can log in but when my auth provider (Auth0) redirects back to my backend it fails on the callback saying it doesn't exist. However, if I use the same .env file when running npm run serve I can log in and have the callback URL work.
Process I am using
npm run buildProd runs the commands vue-cli-service build --mode productionError message from http-server
"GET /callback?code=dcdc1EAzh2Vx0_cN&state=bkFzRWtoUnd5WGJfcGw1d0tuNU1Md0lILmFWTEhxcmZKY0IuQ0NrRE9lVA%3D%3D" Error (404): "Not found"
I am looking to see if anyone knows why this might be happening? I have not tried a full production deploy to the production infrastructure yet as I don't want to break it.
It turns out I was not running Vue and serving the file in a supported format. I ended up creating a simple HTTP server using Node.js and serving the index.html file and it got rid of the error but introduced a new one I plan to ask about soon