title: passport-google-auth + aws cognito + nodejs
body: <p>I am using passport-google-auth to authenticate google users, and it returns me access_token that I am using to get aws Cognito credentials, but it throws an error:</p>
  
  <blockquote>
    <p>NotAuthorizedException: Invalid login token. Not a valid OpenId Connect identity token.</p>
  </blockquote>
  
  <p>my code snippet:</p>
  
  <pre><code>passport.use(new GoogleStrategy(googleDeveloperDetails, getUserDetails));
  
  app.get("/auth/google", passport.authenticate("google", { scope: ['email'] }));
  
  var authGoogle = passport.authenticate("google", {
  failureRedirect: "/auth/google"
  });
  
    app.get("auth/google/callback", authGoogle, controller.successRedirect);
  
   getUserDetails = function(accessToken, refreshToken, params, profile, done) {        
      profile.token = accessToken;      
      done(null, profile);
  }
  
  googleDeveloperDetails = {
      clientID: "google cleint ID",
      clientSecret: "google client secret",
      callbackURL: "https://localhost:3000/auth/google/callback",
      profileFields: ["emails", "profile"]
  }
  </code></pre>