AuthKit from WorkOS integration
Tried to integrate custom Auth with AuthKit from WorkOS but realised the access token they provide lack of the “aud” field which is what convex auth config need for its applicationID field. Or am I missing something? If anyone could point me in the right direction or was able to pull it off, please let me know!
9 Replies
Convex with Auth.js (NextAuth)
Learn how to use Auth.js with your Next.js server and Convex backend to build a full-featured authentication system.
@Michal Srb Thank you. Reviewed next-auth but I need auth for both nextjs and expo. next-auth doesn't provide native support from what I understand. Asked workOS if they planned to provide custom fields on their access_token which doesn't seem to be the case at this time.
I'm in a similar boat. I need auth for mobile and web. Clerk was easy to set up, and works well with convex. But I doubt i'll generate much revenue, so I am experimenting with Lucia auth, so far so good.
The reason I want AuthKit is the easy integration with WorkOS enabling SSO which a requirement for most of my clients. Clerk provides it somehow but seems way more work to setup and I'm familiar with workOS. But will explore further with Clerk.
Hi @sbkl - were you ever able to get workOS to work? Was the lack of aud (audience) field the only blocker that stopped you?
I couldn’t investigate further because of the missing aud claim from authkit. If web only, Auth.js should make the job. Supabase auth for both react and react native could be an alternative but I didn’t look into it.
Hi @Michal Srb , are there any plans to make it easier to integrate Convex with WorkOS/AuthKit for a tech stack with Next.js and React Native? I think WorkOS is a better fit for my app than Clerk is, but I use Clerk since there is a lot of documentation for Convex and Clerk
I can't make any promises, but the auth-running-on-your-backend lib should enable this (but server-side Next.js support is TBD). Eventually it would be nice to have WorkOS integration on par with Clerk, but I haven't looked into it yet.
I Googled "auth-running-on-your-backend lib" and didn't find anything, so I'm assuming you're referring to the upcoming Convex native auth