Get refresh_token using auth0 react

How can I return the refresh_token in my react app? I am currently using getAccessTokenSilently which is returning access_token, expires_in, id_token, and scope. The code is the following:

const refreshToken = await getAccessTokenSilently({
                    ignoreCache: true,
                    audience: `https://${domain}/api/v2/`,
                    redirect_uri: "...",
                    scope: "openid offline_access",
                    grant: "refresh_token",
                    detailedResponse: true,
                });

                console.log("RF: ", refreshToken);
  • Which SDK this is regarding: auth0-react
  • SDK Version: 1.10.2

hey there @lm2000!

getAccessTokenSilently is described here - Are you meeting all the requirements listed? Are you including the offline_access scope in the initial authorize request? You can configure the SDK to do this for you.

The following topics may be useful as well:

Hope this helps!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.