title: 'Login Required' error. How to login after getting oauth2 token with Google API
body: <p>I'm building a small Node/React app where I'm trying to implement OAuth2 Google to request the Google Analytics API. I'm using <a href="http://www.passportjs.org/" rel="nofollow noreferrer">Passport.js</a> to handle the authentification. </p>
  
  <p>I'm able to get the Token correctly: </p>
  
  <pre><code>router.get(
      "/auth/google/callback",
      passport.authenticate("google", { failureRedirect: "/error", session: false }),
      function(req, res) {
          var token = req.user.token;
          res.redirect("http://localhost:5000/?token=" + token);
      }
  );
  </code></pre>
  
  <p>However, when trying to call the Google Analytics management API I have the following error <code>Error: Login Required</code>.  </p>
  
  <pre><code>router.get('/getData', function(req, res) {
      googleAccounts.management.profiles.list(
        {
          accountId: '~all',
          webPropertyId: '~all'
        },
        (err, data) =&gt; {
          if (err) {
            console.error('Error: ' + err)
            res.send('An error occurred')
          } else if (data) {
  
            Console.log(data)
  
          }
        }
      )
  })
  </code></pre>
  
  <p>How do I login? What step I'm missing?</p>