Alireza Esmikhani
Alireza Esmikhaniโ€ข2w ago

Doc Issue: Wrong applicationID in WorkOS AuthKit example

Hey Convex team ๐Ÿ‘‹ I noticed a small but important issue in the AuthKit documentation (https://docs.convex.dev/auth/authkit/). In the example for auth.config.ts, the applicationID field is incorrectly included in the second provider configuration (the one with issuer: https://api.workos.com/user_management/${clientId}). Hereโ€™s the snippet from the docs:
const clientId = process.env.WORKOS_CLIENT_ID;

const authConfig = {
providers: [
{
type: 'customJwt',
issuer: `https://api.workos.com/`,
algorithm: 'RS256',
jwks: `https://api.workos.com/sso/jwks/${clientId}`,
applicationID: clientId,
},
{
type: 'customJwt',
issuer: `https://api.workos.com/user_management/${clientId}`,
algorithm: 'RS256',
jwks: `https://api.workos.com/sso/jwks/${clientId}`,
applicationID: clientId, // :x: This shouldn't be here
},
],
};

export default authConfig;
const clientId = process.env.WORKOS_CLIENT_ID;

const authConfig = {
providers: [
{
type: 'customJwt',
issuer: `https://api.workos.com/`,
algorithm: 'RS256',
jwks: `https://api.workos.com/sso/jwks/${clientId}`,
applicationID: clientId,
},
{
type: 'customJwt',
issuer: `https://api.workos.com/user_management/${clientId}`,
algorithm: 'RS256',
jwks: `https://api.workos.com/sso/jwks/${clientId}`,
applicationID: clientId, // :x: This shouldn't be here
},
],
};

export default authConfig;
The second provider (user_management) should not include applicationID. Removing that line fixes the issue โ€” it took me nearly two days to track this down ๐Ÿ˜… so I thought Iโ€™d share to help others avoid the same problem.
1 Reply
Convex Bot
Convex Botโ€ข2w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!

Did you find this page helpful?