Custom social connection for Quickbooks Online

Hi there!

I am trying to use Auth0 to save access_tokens from Quickbooks Online after users authorize the connection. I am trying to accomplish this with my Intuit sandbox account and a custom social connection on Auth0, but I have not been able to get this to work.

I set up a custom social connection with these parameters:

I used this code for the Fetch User Profile Script:

function(accessToken, ctx, cb) { request.get('https://accounts.intuit.com/v1/openid_connect/userinfo', { headers: { 'Authorization': 'Bearer ' + accessToken } }, function(e, r, b) { if (e) return cb(e); if (r.statusCode !== 200) return cb(new Error('StatusCode: ' + r.statusCode)); var profile = JSON.parse(b); cb(null, { user_id: profile.sub, given_name: profile.givenName, family_name: familyName, email: profile.email, email_verified: profile.email_verified }); }); }

When I try this connection, it fails with this error message:

There could be a misconfiguration in the system or a service outage. We track these errors automatically, but if the problem persists feel free to contact us.
Please try again.

I’m hoping someone can give what I’ve done a once over to see if I’m doing anything silly since I am new to Auth0 (and fairly new to OAuth2.0 as well).

Thanks!

In the error page displayed when you get the shared error message can you check if there is a tracking identifier and/or a technical details section with additional data. With a tracking identifier and a date time of the error we could try to review this further; without that, it’s a bit of a gamble.