I’m trying to set up a custom social connection with Patreon, but I’m running into an error. It seems like the error is on Patreon’s side, because all of the settings in my custom social connection look right to me, and I’m getting back the following error from the Patreon API’s token url (https://www.patreon.com/api/oauth2/token
):
{
"statusCode": 403,
"data": "{\"error\":\"invalid_grant\",\"error_description\":\"Invalid authorization code\"}"
}
I’ve raised this issue with Patreon support, but I am posting here because I can’t see or edit the request that Auth0 is making to the Patreon API’s Token URL, so I want to make sure that it is correct and matches the Patreon OAuth documentation.
As far as I can tell, the auth code generated by Patreon’s Authorization URL is correct, and it is passed back to https://my-subdomain.auth0.com/login/callback
, which redirects to https://manage.auth0.com/tester/callback?connection=Patreon&code={code}
and that is the page where I see the invalid_grant
error.
So it seems like either the code from the Patreon API is incorrect/expired, or it is not passed correctly to the Token URL as a request in the following form:
POST www.patreon.com/api/oauth2/token
code=<single use code>
&grant_type=authorization_code
&client_id=<your client id>
&client_secret=<your client secret>
&redirect_uri=<redirect_uri>
Since I can’t inspect the request Auth0 is making, I’m posting this to ask if the Token URL request that Auth0 makes matches this format, as specified in the Patreon docs.
I’m also open to any suggestions or ideas on how to debug this Custom Social Connection, or what I might be doing wrong that’s preventing it from working.
Thank you!