OAuth 2.0 with Clerk only working for Clerk production project, not dev

I successfully connected Clerk to Retool with OAuth 2.0 from a Rest API resource with Authorization Code Grant, but the issue is that I can only connect to my Clerk production project, not my dev project. All the settings in Retool and my Clerk OAuth app are the exact same for both my prod and dev projects. For production, when I click Connect with OAuth, after I log in, it successfully redirects back to Retool. But for dev, it never redirects back to Retool, it only ever redirects back to the frontend url of my Clerk dev project.

Another related issue is that I can’t see the consent screen. If I set the prompt to Consent instead of Login even for the production project, it will redirect back to the frontend app URL instead of Retool.

Some background: I need to authenticate with Clerk so that users can send authenticated requests to my backend as themselves. Due to this, I do not want to check “Share credentials between users” option, and I’m using Authorization Code Grant instead of Client Credentials.

I followed all the steps in the docs here, would really appreciate any help solving this issue.

Hey Eris,

Nice to meet you and welcome to the Retool community. My name is John and I would like to help out with this Auth connectivity issue :grinning_face:

Since Retool can connect just fine to Production, is there anything different about this Dev instance that might be at play here?

It would be good to check if it is reachable from the Retool instance and vice-versa, do you see any errors when making that connection whether thats in the UI or via the Retool logging? Do you see any errors in the Clerk logging? Please share if you have any.

For the related Consent issue, let's come back to this once we get the Dev instance connection fixed.

Looking forward to hearing back and getting to the bottom of this together.

Regards,
John | Retool Support