Hi Convex team/community,
I’m trying to set up authentication with OIDC on the latest Convex (v1.27.3) and Next.js 13.
I have:
- Client Provider:
import { ConvexReactClient } from "convex/react";
import { ConvexAuthProvider } from "@convex-dev/auth/react";
const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);
<ConvexAuthProvider client={convex}>{children}</ConvexAuthProvider>
-
auth.config.ts
export default {
providers: [
{
domain: "http://localhost:3000",
applicationID: "convex",
},
],
}; -
I get this error when trying to authenticate:
Failed to authenticate: "No auth provider found matching the given token. Check that your JWT's issuer and audience match one of your configured providers: [OIDC(domain=http://localhost:3000, app_id=convex)]"
I also tried importing authConfig or configureAuth from convex/server, but TS says they don’t exist in v1.27.3.
Could someone help me confirm the correct setup for OIDC authentication with the latest Convex and Next.js?
I’d appreciate any pointers or example setup.