feat: add auth0_onboarding tool (DXAA-430)#174
Draft
GilbertLS wants to merge 7 commits into
Draft
Conversation
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
9d76b88 to
7488cce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Adds the
auth0_onboardingMCP 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.auth0_onboarding(src/tools/onboarding.ts): givenapp_name,framework, andproject_path, it:SUPPORTED_FRAMEWORKS/isFrameworkSupportedand validatesproject_path(existing directory, no path traversal).appTypeto an Auth0app_type(spa→spa,webapp→regular_web,native→native) and derivestoken_endpoint_auth_method(nonefor SPA/native,client_secret_postotherwise), creating the app asoidc_conformant.auth0_create_applicationthenauth0_save_credentials_to_file, returning a clear error (including the createdclient_id) if the credential save fails after the app was created.next_steps: ['auth0_get_quickstart_guide']with instructions framing onboarding as a two-step flow, surfacing credential-access andskip_non_verifiable_callback_uri_confirmation_promptnotes when present, and explicitly instructing the agent not to read/echo any.envfile.create:clientsscope; markedlocalOnly,destructiveHint: true,idempotentHint: false.src/tools/index.ts.References
Testing
Unit tests in
test/tools/onboarding.test.tscover framework validation (missing, unsupported, mixed-case),project_pathvalidation, 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 thenext_steps/instructions payload (credential-access and skip-prompt notes).Run:
npx vitest run test/tools/onboarding.test.tsChecklist