I have a React app set up with firebase authentication.
I was previously using the "signInWithPopup" option, but have opted to use the "signInWithRedirect" option since I noticed that the popup would not work on mobile devices.
"signInWithRedirect" works fine in development mode.
However, if I create a production build and serve it on lets say 10.195.3.52:4050 . When I visit the local IP, clicking the "signInWithRedirect" action does absolutely nothing, no console logs, no network activity, it just does nothing.
But if I visit localhost:4050 which is part of the same build, I click "signInWithRedirect" and I get redirected to google and I can sign in with my google account.
I also tried hosting the site on Heroku and I have same issue as with the production build hosted on 10.195.3.52:4050.
Any idea why this is happening ?
CodePudding user response:
Add your domain to the auth section on the console. That is probably why it doesn't work