Hi all
We have social integration with google and salesforce enabled on auth0.
And for API tests, I would like to manage to get a UI-like access token fully via rest API.
I manage to do this for regular auth0 users. The ones which have Username-Password-Authentication - for this I set up Default Directory.
But when it comes to authenticating via API users with ‘google-oauth2’ or ‘salesforce-community’ Connection, some problems emerged
I have added ‘Password’ grant to the client’s application, and my request is
POST https://.auth0.com/oauth/token
BODY
{
“grant_type”:“password-realm”,
“username”:“sf_user_name”,
“password”:“sf_user_pass”,
“client_id”:“auth0_client_id”,
“audience”:“audience”,
“client_secret”:“auth0_client_secret”,
“scope”: “openid profile email”,
“realm”: “salesforce-community”
}
But the error says:
{
“error”: “unauthorized_client”,
“error_description”: “Grant type ‘password-realm’ not allowed for the client.”,
“error_uri”: “Application Grant Types”
}
And it is confusing as when I call
GET https://.auth0.com/api/v2/clients/auth0_client_id
I see that there is such grant type
“grant_types”: [
“client_credentials”,
“authorization_code”,
“password”,
“http://auth0.com/oauth/grant-type/password-realm”
]
So, what is the problem??