JczhangJ
Convex Community3y ago
2 replies
Jczhang

Using Clerk OAuth app with Convex? How to setAuth()?

I am following this for creating my own OAuth app through Clerk: https://clerk.com/docs/advanced-usage/clerk-idp from their tutorial it is clear that I can access /oauth/userinfo to get the userId. But I am not sure what is the access token format from Clerk (looks like it is not a convex compatible jwt) and what should I do if I want to use a convex client from backend.

After I have the access token from Clerk OAuth or I already know the userId within the request, how to setAuth() for convex client? I don't know what jwt to pass in since I am using Clerk. Is there a super admin convex client that I can directly operate with known userId?

Thanks for helping!
Learn how to use Clerk to facilitate Single Sign-On (SSO) with other clients that support the OAuth 2.0 protocol.
Use Clerk as an OAuth 2 Provider | Clerk
Was this page helpful?