I'm attempting to deploy this application to heroku. I have successfully deployed the application to heroku and added the redirectURI to my google cloud environment.
My problem
When it comes to logging in through Oauth, I receive the error "Error 400: redirect_uri_mismatch". This is because heroku listens for an HTTP request and not an HTTPS request, and google requires HTTPS when in production.
Steps taken so far
I have changed the callbackURI in /config/passport.js to force HTTP when in production, and changed proxy to true:
How to reproduce
I'm attempting to deploy this application to heroku. I have successfully deployed the application to heroku and added the redirectURI to my google cloud environment.
My problem
When it comes to logging in through Oauth, I receive the error "Error 400: redirect_uri_mismatch". This is because heroku listens for an HTTP request and not an HTTPS request, and google requires HTTPS when in production.
Steps taken so far
I have changed the callbackURI in /config/passport.js to force HTTP when in production, and changed proxy to true:
passport.js
Just wondering if anyone could help me with this, cheers 😁