#npx convex auth add workos

3 messages · Page 1 of 1 (latest)

shy kite
#

npx convex auth add workos does not work error: too many arguments for 'add'. Expected 0 arguments but got 1.

maiden sequoiaBOT
#

Hi @shy kite. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The npx convex auth add workos command has been removed. As noted in the knowledge sources, the convex auth commands are no longer valid. [WorkOS thread]

You should follow the current up-to-date instructions in the official Convex WorkOS AuthKit guide instead. The correct way to set up WorkOS AuthKit with Convex is to manually configure your convex/auth.config.ts file. For example:

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}`,>
    },
  ],
};

export default authConfig;

Then run npx convex dev to sync the configuration to your backend. [AuthKit docs]

For full setup instructions, refer to the official guide at https://docs.convex.dev/auth/authkit.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: