I’m using AuthenticationApi Resource Owner Flow for authenticating user as shown in below code.
var result = await
client.GetTokenAsync(new
ResourceOwnerTokenRequest
{
ClientId = _auth0Settings.ClientId,
ClientSecret = _auth0Settings.ClientSecret,
Audience = _auth0Settings.ApiIdentifier,
Scope = scope + " all",
Realm = connection,
Username = loginViewModel.EmailAddress,
Password = loginViewModel.Password,
});
var access_token = result.AccessToken;
I was able to get access_token successfully while using old Auth0 account created at 28/05/2017, but while using same code with new Auth0 account + newly created users, I am getting an error:
Grant type ‘http://auth0.com/oauth/grant-type/password-realm’ not allowed for the client.
According to this post, by using Management Api I can add grant-type to given client. But question is how to do so?