Auth0 Home Blog Docs

Refresh Token Result is null

I am using to auth0 to authenticate my Xamarin Forms application. I am able to authenticate and also get a refresh token.

However, the following line always returns null.

var refreshTokenResult = await _auth0Client.RefreshTokenAsync(refresh_token);

Any idea why?

Hi @napoleon.i.jones.3,

Welcome to the Auth0 Community Forum!

Just to clarify, you are saying:

Do you get a refresh token? How do you know?

Otherwise I would like to confirm that you are requesting the offline_access scope.

Thanks,
Dan

I receive a refresh token and store it in secure storage. I’ve stepped through the code.

Can you check and see if you are getting any errors in the dashboard, or if a new token is being issued.

Thanks,
Dan

I am having the same issue. Calling Login without Audience seems to work. But I have to pass the audience, so skipping it is not an option.

Please advice accordingly.

@anandts,

Can you check your logs and see if there are any errors on the transaction?

And just to clarify, can you post the code you are using to make the call when you are not getting the token?

Thanks,
Dan

var options = new Auth0ClientOptions
{
Domain = “me.auth0.com”,
ClientId = “**********************************”,
Scope = “openid offline_access profile email”
};

var client = new Auth0Client(options);

Audience = “https://api.<>.com/the-app” or similar
LoginResult loginResult = await client.LoginAsync(new { audience = Audience });

var loginResult = await client.LoginAsync(options);

Can you please DM me a HAR file so I can investigate further?

And please provide your tenant name.