Why is react-native-auth0 getCredentials returning undefined with forceRefresh set to true?

I am currently trying to force refresh the credentials and I noticed that the getCredentials function has a parameter forceRefresh which sounds like what I need, however, when I call the function like this:

const credentials = await getCredentials(undefined, undefined, undefined, true)

I get returned undefined, whereas:

const credentials = await getCredentials()

returns the credentials just fine.

I also tried the following:

const credentials = await getCredentials('openid email profile offline_access', undefined, undefined, true)

But the result was the same.

I should have a refresh token stored since I authorize like this:

await authorize({ scope: 'openid email profile offline_access' });

Also, if I were to force refresh the credentials this way, would the new credentials be shared with the web browser?


The process for refreshing tokens really needs a working example.

It appears to be possible but there’s no indication of how to execute it…