OAuth2.0 is working in localhost but not when deployed online

I was learning to make login page for web pages in NodeJS. I tried to make the login possible via Google Id as it comes in sites like flipkart or others. It worked in Localhost ,But when I deployed it on heroku it is not working.I changed the fields as shown in picture from http://localhost:3000 to the domain of my project I got from heroku.
Annotation 2020-06-20 032152
If someone knows to how to fix it please help me…
github repo- https://github.com/kitarp29/secrets
site link -https://aqueous-ravine-15860.herokuapp.com/

The error I get is this -
image

Hey @pratik, looks like the image has been removed, i tried registering myself through http://aqueous-ravine-15860.herokuapp.com/auth/google and i get a 500 respone, could you share the stack trace by node.
Also i have noticed that the github repo leaks the mongo uri and the session secret key.

1 Like

Thanks for bringing this to my attention about the Mongo URI and secret key
Actually I had tackled the Problem, I had posted here with the help of Yashraj Bhaiya.
You can try my site https://intense-beach-81824.herokuapp.com/
The problem actually was with my UserSchema.I don’t know why the image is not available,ask the maintainer.
Thanks Once again.

1 Like