Skip to content

feat: add auth0_onboarding tool (DXAA-430)#174

Draft
GilbertLS wants to merge 7 commits into
feat/DXAA-auth0-get-quickstart-guide-toolfrom
feat/DXAA-auth0-onboarding-tool
Draft

feat: add auth0_onboarding tool (DXAA-430)#174
GilbertLS wants to merge 7 commits into
feat/DXAA-auth0-get-quickstart-guide-toolfrom
feat/DXAA-auth0-onboarding-tool

Conversation

@GilbertLS
Copy link
Copy Markdown
Contributor

Note: This branch is stacked on feat/DXAA-auth0-get-quickstart-guide-tool, which is not yet merged to main. This PR targets that parent branch and only covers the commits from c9ccc11 onward (the auth0_onboarding work).

Changes

Adds the auth0_onboarding MCP tool, a single-call entry point that creates an Auth0 application for a given framework, saves its credentials to the project, and hands off to the quickstart guide.

  • New tool auth0_onboarding (src/tools/onboarding.ts): given app_name, framework, and project_path, it:
    • Validates the framework against the shared SUPPORTED_FRAMEWORKS / isFrameworkSupported and validates project_path (existing directory, no path traversal).
    • Fetches the quickstart spec before creating anything, so an unsupported framework or CDN outage fails without side effects.
    • Maps the spec appType to an Auth0 app_type (spaspa, webappregular_web, nativenative) and derives token_endpoint_auth_method (none for SPA/native, client_secret_post otherwise), creating the app as oidc_conformant.
    • Delegates to auth0_create_application then auth0_save_credentials_to_file, returning a clear error (including the created client_id) if the credential save fails after the app was created.
    • Returns next_steps: ['auth0_get_quickstart_guide'] with instructions framing onboarding as a two-step flow, surfacing credential-access and skip_non_verifiable_callback_uri_confirmation_prompt notes when present, and explicitly instructing the agent not to read/echo any .env file.
  • Requires the create:clients scope; marked localOnly, destructiveHint: true, idempotentHint: false.
  • Registered the tool in src/tools/index.ts.

References

Testing

Unit tests in test/tools/onboarding.test.ts cover framework validation (missing, unsupported, mixed-case), project_path validation, auth/domain checks, spec-unavailable and unknown-app-type handling, app-type mapping and auth-method derivation, the create → save delegation (including save-after-create failure), and the next_steps/instructions payload (credential-access and skip-prompt notes).

Run: npx vitest run test/tools/onboarding.test.ts

  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

GilbertLS and others added 6 commits June 4, 2026 13:58
Orchestrates Auth0 project onboarding by validating framework/path,
fetching CDN spec, creating an application with correct config, and
saving credentials to .env. Returns next_steps for quickstart guide.
When save_credentials fails, include the created client_id in the error
so the LLM knows the app exists. Add defensive defaults for saveData
fields. Add tests for path resolution and case-insensitive framework.
…the onboarding tool for unsupported frameworks
…x .env file detection when running the get quickstart tool
…e before and after the save credentials tool execution
@GilbertLS GilbertLS force-pushed the feat/DXAA-auth0-onboarding-tool branch from 9d76b88 to 7488cce Compare June 4, 2026 18:00
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.

2 participants