auth0/auth0.net

No possibility of gaining refresh token

rysiuwroc opened this issue · 1 comments

It is not possible to gain Refresh Token with .GetTokenAsync request using ResourceOwnerTokenRequest or any other.
I want to get the refresh token providing email and password.
Did I miss something?

SOLVED! Answering myself for other people having the same problem.

You have to add an additional Scope ofter openid followed by space:

var request = new ResourceOwnerTokenRequest
            {
                Audience = _settings.ApiIdentifier,
                ClientId = _settings.ClientId,
                ClientSecret = _settings.ClientSecret,
                Password = password,
                Username = email,
                ForwardedForIp = _settings.ForwardedForIp,
                SigningAlgorithm = JwtSignatureAlgorithm.RS256,
                Scope = "openid offline_access"
            };