Can Convex Auth be a OAuth 2 Provider for other apps?
If my Next.js app uses Convex Auth, can that app, in turn, become a OAuth 2 Provider for other apps? Seems like Convex Auth cannot, based on my research on Auth.js.
As a reference, this is the use case I'm referring to if the app were to use Clerk: https://clerk.com/docs/advanced-usage/clerk-idp
Advanced Usage: Use Clerk as an OAuth 2 Provider
Learn how to use Clerk to facilitate Single Sign-On (SSO) with other clients that support the OAuth 2.0 protocol.
2 Replies
With Convex Auth your backend is already an OIDC provider (used by itself).
But presumably you'd want a separate config for external clients. That's not something built-in (out of scope for this initial release), but totally technically doable.
If you follow the Convex+Auth.js articles you'll get a decent amount towards building something like it:
https://stack.convex.dev/nextauth
Stack
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.
Ah, clarifying. The key thing I learned here is that Convex is acting as the OIDC provider.
That's why the Auth.js website doesn't readily talk about this use case: Auth.js's responsibility is to integrate with other OIDC providers.
Thanks Michal - marking this post as resolved