Skip to content

fix: JS template uses OrkesClients.from() with optional auth#5

Open
nthmost-orkes wants to merge 1 commit intomainfrom
fix/js-template-oss-auth
Open

fix: JS template uses OrkesClients.from() with optional auth#5
nthmost-orkes wants to merge 1 commit intomainfrom
fix/js-template-oss-auth

Conversation

@nthmost-orkes
Copy link
Copy Markdown
Contributor

Summary

The JavaScript worker template was using orkesConductorClient which requires keyId/keySecret — those render as empty strings for OSS users, causing the client to fail authentication.

Changes

  • Replace orkesConductorClient with OrkesClients.from() — auth fields are optional in OrkesApiConfig
  • Use Mustache sections ({{#auth_key}}...{{/auth_key}}) so keyId/keySecret are only included when auth is configured
  • For OSS users (no auth), generates:
    const config = { serverUrl: "http://localhost:8080/api" };
  • For Orkes users (auth configured), generates:
    const config = {
      serverUrl: "https://...",
      keyId: "...",
      keySecret: "...",
    };
  • Switch from TaskManager to TaskHandler (consistent with SDK docs and exports)

Works with the CLI fix in conductor-oss/conductor-cli#78 that defaults server_url to http://localhost:8080/api.

Related issues

Closes conductor-oss/getting-started#15

🤖 Generated with Claude Code

- Replace orkesConductorClient (requires keyId/keySecret) with
  OrkesClients.from() where auth fields are optional
- Use Mustache sections so keyId/keySecret are only included when
  auth_key is configured — OSS users get a clean no-auth client
- Switch from TaskManager to TaskHandler (consistent with SDK docs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

conductor code: generated main.py has empty server URL and unnecessary auth for OSS

1 participant