How to get refresh token using passport google oAuth?

I am using passport-google-oauth20 for google authentication using passportjs. I am getting the accessToken. But the refreshToken I am getting is undefined.
here is the code I am writting-

const passport = require(‘passport’);
const GoogleStrategy = require(‘passport-google-oauth’).OAuth2Strategy;
const refresh = require(‘passport-oauth2-refresh’)

passport.serializeUser((user, done) => {
done(null, user);
})

passport.deserializeUser((id, done) => {
User.findById(id).then((user) => {
done(null, user);
})
})

var strategy = new GoogleStrategy({
callbackURL: “http://localhost:3000/auth/google/redirect”,
clientID: keys.google.clientID,
userProfileURL: ‘https://www.googleapis.com/oauth2/v3/userinfo’,
clientSecret: keys.google.clientSecret
}, async (accessToken, refreshToken, profile, done) => {
console.log(‘------------->’, accessToken, ‘\n------------->’,refreshToken);
});

passport.use(strategy);
refresh.use(strategy);

This is strictly specific to Google OAuth 2.0 and they have some specific requirements in terms of when refresh tokens are issued. You should check (Como usar o OAuth 2.0 para aplicativos de servidor da Web  |  Authorization  |  Google Developers) and just do a search by refresh token and read the relevant bits. For example, a specific parameter is required to issue a refresh token and after one is issued re-issuing another one also has its own considerations.