I am trying to make sure that when I use webAuth to return an access token, I also get a refresh token so I can silently refresh the token without having to log out the user.
However, when using webAuth like so:
const response = await auth0.webAuth.authorize({
connection: 'facebook',
scope: 'offline_access openid profile email',
audience: 'myaudience',
});
I don't get back any refresh token.
I tried googling the problem but nothing came up. There is one tutorial by Pusher (https://pusher.com/tutorials/auth0-react-native-chat) that suggests you have to add a device field to the request like so:
const response = await auth0.webAuth.authorize({
connection: 'facebook',
scope: 'offline_access openid profile email',
audience: 'myaudience',
device: DeviceInfo.getUniqueId(),
});
But this also does not seem to work since no refresh token is returned.
Can anyone please tell me how I can get a refresh token? Or make sure I can refresh my token in a different way?
@lbalmaceda please evaluate
Hi @reinvanimschoot, is your audience an API? If so, make sure you're enabling offline access in the API settings.

Closing due to inactivity.
Most helpful comment
Hi @reinvanimschoot, is your audience an API? If so, make sure you're enabling offline access in the API settings.
