Can't get google refresh token using auth0.js

I am using auth0.js v9 in my client to authenticate my users by social login. In the server I am using the${userId} endpoint. Following the documentation I should be able to get a IdP google refresh token if the user accept the scope ‘offline_acccess’. Still, I can’t get the refresh token from my users.

Here is my client code:

var webAuth = new auth0.WebAuth({
clientID: global.WEB_APP.config.AUTH0.CLIENT_ID,
domain: global.WEB_APP.config.AUTH0.DOMAIN,
responseType: ‘token id_token’,
audience: ‘https://’ + global.WEB_APP.config.AUTH0.DOMAIN + ‘/userinfo’,
redirectUri: window.location.href,
scope: ‘openid profile offline_access’

        connection:  'google-oauth2',
        connection_scope: connection === ','

And my user when try to login has to accept the offline_access permission.

In my backend code:

const url = `${userId}`
    return got(url, {
        headers: {
          authorization: 'MY_AUTH0_TOKEN'
        json: true
      .then(({ body }) => {
        return body.identities[0]

Solved. Just added in the authorize function the offline access parameter:

    connection: 'google-oauth2',
    connection_scope: ',',
    scope: 'openid profile',
    accessType: 'offline',
    approvalPrompt: 'force'