Skip to content

Devx 314 cli onboarding changes#68

Open
smukherjee-godaddy wants to merge 2 commits into
godaddy:mainfrom
smukherjee-godaddy:DEVX-314-cli-onboarding-changes
Open

Devx 314 cli onboarding changes#68
smukherjee-godaddy wants to merge 2 commits into
godaddy:mainfrom
smukherjee-godaddy:DEVX-314-cli-onboarding-changes

Conversation

@smukherjee-godaddy

Copy link
Copy Markdown

Summary

Users now accept legal agreements directly in the terminal before SSO, and onboarding completes automatically in the
background after login — no browser redirect to the portal registration page required.

Changes

  • src/core/onboarding.ts — Removed local callback HTTP server, waitForOnboardingCompleteEffect, and browser
    imports. Added two new effects:
    • checkOnboardingStatusEffect — POST /api/v1/onboarding/status to get current org status
    • completeOnboardingEffect — POST /api/v1/onboarding/cli to accept all agreements and submit onboarding in one
      call
  • src/cli/commands/auth.ts — Updated login flow:
    • Shows ToS / Privacy Policy / Developer Agreement links before opening the browser; prompts user to press Enter
      to accept (skipped in non-interactive/CI)
    • After OAuth, checks onboarding status; if PENDING calls completeOnboardingEffect
    • Emits org_id and onboarding status in result; both steps are non-fatal
  • src/core/environment.ts — Added getDevxCoreUrl with DEVX_CORE_URL env var override for local dev
  • src/core/auth.ts — Token exchange now includes client_secret in request body

Test Plan

  • New user → agreement prompt shown → OAuth → onboarding completes → org_id in output
  • Existing ACTIVE user → same flow, returns immediately without re-onboarding
  • Non-interactive (echo "" | godaddy auth login) → prompt skipped, proceeds automatically
  • Re-login → already-accepted agreements handled idempotently, no error

- Introduced onboarding status checks and completion via new API calls.
- Added agreement URLs for terms of service, privacy policy, and developer agreement.
- Updated authentication result to include onboarding status.
- Enhanced CLI interaction to prompt users for agreement acceptance before proceeding with authentication.
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.

1 participant