I am currently following a tutorial on setting up Google Oauth in my Express app using Passport.js. The tutorial can be found here.
Below are the routes defined in my server.js
file:
// Code snippet here
The server.js
file also imports configurations from passport-setup.js
:
// More code snippets here
Upon starting up my app and accessing localhost:19006/google
, I am redirected to the Google Oauth login page. However, I encounter an issue where I get redirected to a link with a 404 error for "/auth/google/callback". I have checked my express routes and verified that the route is defined.
Furthermore, I attempted adding console.log messages to debug the issue but did not receive any output.
Steps Taken
In the Google Developer Console, I configured the Client ID for the web application as shown in the image below: Image of credentials
I have also attempted replacing "localhost" with "127.0.0.1" in both the code routes and Google Developer Console settings without success.