Check out example codes for "passport google oauth20". It will help you in understanding the concepts better.

Code Example 1

//To install
npm install passport-google-oauth20  

//To Acquire it
var GoogleStrategy = require('passport-google-oauth20').Strategy;

//To use findOrCreate install the package <findorcreate-mongoose>
passport.use(new GoogleStrategy({
    clientID: GOOGLE_CLIENT_ID,
    clientSecret: GOOGLE_CLIENT_SECRET,
    callbackURL: "http://www.example.com/auth/google/callback"
  },
  function(accessToken, refreshToken, profile, cb) {
    User.findOrCreate({ googleId: profile.id }, function (err, user) {
      return cb(err, user);
    });
  }
));

//GET Route
app.get('/auth/google',
  passport.authenticate('google', { scope: ['profile'] })
);

//Callback GET Route from Google
app.get('/auth/google/callback', 
  passport.authenticate('google', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
});

Learn ReactJs, React Native from akashmittal.com