Search code examples
reactjsnext.jsfirebase-authenticationvercelrailway

Firebase Login feature not working in deployed Next js app but works fine in local environment


I have created a next js app with firebase Google login feature, it works absolutely fine in my local environment but when I deployed it on Railway and Vercel the Login feature is not working, as the user clicks on the login button it doesn't show the pop-up window.

Does it has to do anything with PORT number? Like I saw some of the answers where someone told env.PORT || 3000, can someone please elaborate the solution


Solution

  • You need to add your domain to the list of the authorized domains in the Firebase Auth. See: enter image description here