I am trying out Auth0. I have created machine-to-machine application. The idea is to have a mobile app use our own developed REST API. These REST APIs will invoke the Auth0 APIs.
But I get this error when I try Facebook login. I dont see any “Enable Sign In with Facebook” option in this machine to machine application. Also to test I created another “Native” application. and in that the “Enable Sign In with Facebook” toggle is there, but it is disabled.
Please suggest how should I proceed.
The error I get is :
{
“error”: “unauthorized_client”,
“error_description”: “Grant type urn:ietf:params:oauth:grant-type:token-exchange with subject_token_type http://auth0.com/oauth/token-type/facebook-info-session-access-token is not enabled for this client”
}
The API I invoked is:
curl --location --request POST ‘https://dev-bd9vtd3b.us.auth0.com/oauth/token’
–header ‘Content-Type: application/x-www-form-urlencoded’
–data-urlencode ‘grant_type=urn:ietf:params:oauth:grant-type:token-exchange’
–data-urlencode ‘subject_token=…’
–data-urlencode ‘client_id=DH…Fs’
–data-urlencode ‘client_secret=…’
–data-urlencode ‘subject_token_type=http://auth0.com/oauth/token-type/facebook-info-session-access-token’
–data-urlencode ‘user_profile={“email”:“…”, “name”:“…”}’
–data-urlencode ‘scope=openid profile email offline_access update:current_user_identities’
Thank you for quick reply.
But for “Machine to Machine” application, I dont see this option at all.
And for the “Native” application, I see it, but it is disabled. I cant toggle it.
I see some javascript error when I click on this toggle button.
Uncaught TypeError: Cannot read property ‘sanitize’ of undefined
at t.e.isValid (main.js:1)
at Object.updateModel [as client.native_social_login.facebook] (main.js:1)
at main.js:1
at M.createElement.NE.onChange (main.js:1)
at onChange (vendor.js:1)
at Object. (vendor.js:1)
at p (vendor.js:1)
at vendor.js:1
at w (vendor.js:1)
at A (vendor.js:1)
at Array.forEach ()
at C (vendor.js:1)
at I (vendor.js:1)
at On (vendor.js:1)
at Is (vendor.js:1)
at Le (vendor.js:1)
at An (vendor.js:1)
at vendor.js:1
at Object.t.unstable_runWithPriority (vendor.js:1)
at Ds (vendor.js:1)
at xn (vendor.js:1)
at HTMLDocument.sentryWrapped (helpers.ts:77)
Is Native Facebook login not supported in “Machine to Machine Applications”? Because I dont see the “Enable Sign In with Facebook” option in dashboard for this type of applications.
In the meantime, you can still update your application by using the management API. You can use the PATCH /api/v2/clients/{id} with the following payload:
So if we are developing a proxy API which accepts requests from mobile application (mobile app has social login also) and then invokes the Auth0 APIs, then we need to have one “Machine to Machine Application” to generate management token and one “native” application for each mobile app.
Is my understanding correct? @konrad.sopala@ricardo.batista