SohiziS
Convex Community9mo ago
3 replies
Sohizi

Custom jwt in convex

Hi,
I'm trying to implement a custom jwt provider for my convex, however, I'm gettign an error that I'm not able to debug.
Could you please help me understand where is the issue?

my auth.config.ts
export default {
    providers: [
      {
        type: "customJwt",
        applicationID: process.env.JWT_AUDIENCE,
        issuer: process.env.CONVEX_SITE_URL,
        jwks: 
${process.env.CONVEX_SITE_URL}/.well-known/jwks.json
,
        algorithm: "RS256",
      }
    ]
  };


Here is the error:

[
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      "appAuth",
      0,
      "domain"
    ],
    "message": "Required"
  }
]


The domain is not required when using customJwt. So I don't understand what's the problem here.
Was this page helpful?