Skip to content

feat: add auth password-login, pull, and push commands#422

Open
moranshe-max wants to merge 4 commits intomainfrom
feature/add-password-login-command
Open

feat: add auth password-login, pull, and push commands#422
moranshe-max wants to merge 4 commits intomainfrom
feature/add-password-login-command

Conversation

@moranshe-max
Copy link
Collaborator

@moranshe-max moranshe-max commented Mar 17, 2026

Note

Description

This PR introduces a new auth command group for managing app authentication settings from the CLI. It adds auth password-login (with --enable/--disable flags), auth pull (fetch remote auth config to local file), and auth push (sync local auth config to Base44). The deploy command is also updated to push auth config automatically as part of deployment.

Related Issue

None

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • Added packages/cli/src/cli/commands/auth/ with index.ts, password-login.ts, pull.ts, and push.ts commands
  • Added packages/cli/src/core/resources/auth-config/ resource module with API client, config file management, schema (Zod), and resource interface
  • Registered auth command in program.ts
  • Updated project config (config.ts, schema.ts, types.ts) to include authDir and load auth config during readProjectConfig()
  • Updated deploy command to push auth config to Base44 as part of the deployment flow
  • Added auth password-login --enable/--disable non-interactive flag-based API (no interactive prompts)
  • Added warning when disabling password login leaves no login methods enabled (lockout prevention)
  • Added CLI integration test (auth_password_setup.spec.ts) and core unit tests (auth-password.spec.ts)

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (npm test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated docs/ (AGENTS.md) if I made architectural changes

Additional Notes

The auth-config resource follows the established Resource<T> pattern with separate pull.ts and push.ts modules, consistent with the existing resource architecture. Auth config is stored locally in the project's authDir and synced to/from the Base44 API.


🤖 Generated by Claude | 2026-03-22 00:00 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.47-pr.422.e7d50a7

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.47-pr.422.e7d50a7"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.47-pr.422.e7d50a7"
  }
}

Preview published to npm registry — try new features instantly!

@moranshe-max moranshe-max requested a review from kfirstri March 17, 2026 09:05
@moranshe-max moranshe-max force-pushed the feature/add-password-login-command branch from 53d8672 to 60fd351 Compare March 17, 2026 11:52
@kfirstri kfirstri moved this from Backlog to In review in CLI Development Mar 18, 2026
Copy link
Collaborator

@Paveltarno Paveltarno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude is pretty dumb sometimes

@moranshe-max moranshe-max changed the title feat: add auth password-login command feat: add auth password-login, pull, and push commands Mar 22, 2026
moranshe-max and others added 3 commits March 22, 2026 14:40
Add `base44 auth password-login` command for enabling/disabling username &
password authentication. Introduces the `auth` command group and the core
`auth-config` module with Zod schemas, API client, and camelCase transforms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove interactive prompts in favor of explicit --enable and --disable flags.
Add comprehensive input validation with agent-friendly error hints.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrate auth-config from standalone core module to the unified resources
pattern. Add `auth pull` and `auth push` CLI commands for syncing auth
configuration. Extend project config and deploy to support auth-config
as a deployable resource.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@moranshe-max moranshe-max force-pushed the feature/add-password-login-command branch from 837aaa9 to 3cd3e7a Compare March 22, 2026 12:40
Replace removed runCommand/RunCommandResult imports with Base44Command
and import RunCommandResult from @/cli/types.js to match the new
command pattern introduced on main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@moranshe-max moranshe-max requested a review from Paveltarno March 22, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants