Open SultanHboush opened 2 years ago
Your auth routes are mounted at /api/auth
here:
app.use("/api/auth", authRoute);
And the routes define a /google/callback
route:
router.get(
"/google/callback",
That would make the path to the callback /api/auth/google/callback
, rather than /auth/google/callback
(note the missing /api
).
Why I'm getting this error! Cannot
GET /auth/google/callback
after choosing an account from the google login page I got redirected to a white page with the above error, its been a week working on this google login thing!This is
index.js
file:This is the
passport.js
file:This is the
auth.js
file:Login without passportjs works fine no issues only the google login, I just want the profile data to appear on my console log!
The Google Cloud Console:
https://i.ibb.co/zSPCxqs/Screen-Shot-2022-08-21-at-5-06-50-PM.png