title: redirect_uri_mismatch: http://localhost:4500/AUTH/auth/google/callback, does not match t
body: <p>there are tons of questions with this issue, I read them all but did not see any similar issue. in my case &quot;auth&quot; is prepending. this is what i registered in the app settings as call back url</p>
  <p>http://localhost:4500/auth/google/callback</p>
  <p>this is passport.js configuration:</p>
  <pre><code>passport.use(
    new GoogleStrategy.Strategy(
      {
        clientID: process.env.GOOGLE_CLIENT_ID!,// &quot;!&quot; is typescript 
        clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
        callbackURL: &quot;auth/google/callback&quot;,
      },
      async (accessToken, refreshToken, profile, done) =&gt; {
        const existingUser = await User.findOne({ googleId: profile.id });
        if (existingUser) {
          done(undefined, existingUser);
        }
        const user = await new User({ googleId: profile.id }).save();
        done(undefined, user);
      }
    )
  );
  </code></pre>
  <p>Here are the routes:</p>
  <pre><code>export const authRoutes = (app: Application) =&gt; {
    //with passing &quot;google&quot; passport knows that it will use GoogleStrategy
    app.get(
      &quot;/auth/google&quot;,
      passport.authenticate(&quot;google&quot;, { scope: [&quot;profile&quot;, &quot;email&quot;] })
    );
  
    app.get(&quot;/auth/google/callback&quot;, passport.authenticate(&quot;google&quot;));
    app.get(&quot;/auth/current_user&quot;, (req: Request, res: Response) =&gt; {
      res.send(req.user);
    });
    app.get(&quot;/auth/logout&quot;, (req: Request, res: Response) =&gt; {
      req.logout();
      res.json({ user: req.user });
    });
  };
  </code></pre>
  <p>here is the error message:</p>
  <blockquote>
  <p>Error 400: redirect_uri_mismatch
  The redirect URI in the request, http://localhost:4500/auth/auth/google/callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: <a href="https://console.developers.google.com/apis/credentials/oauthclient/$%7Byour_client_id%7D?project=$%7Byour_project_number%7D" rel="nofollow noreferrer">https://console.developers.google.com/apis/credentials/oauthclient/${your_client_id}?project=${your_project_number}</a></p>
  </blockquote>