CLI
Add a confirmed account to an existing organization. Choose the organization and roles before running the command so the user lands in the right workspace.
yarn mercato auth add-user creates a new user, hashes the provided password, and links the account to roles in the same tenant as the organization.
yarn mercato auth add-user \
--email "<user@email>" \
--password "<password>" \
--organizationId <uuid> \
[--roles role1,role2]
Aliases:
--org or --orgId for --organizationId.--roles:
UserRole link.Set OM_USER_PASSWORD in your shell from your password manager before running the command.
ORG_ID=$(yarn mercato auth list-orgs | awk 'NR==5 {print $1}')
yarn mercato auth add-user \
--email [email protected] \
--password "$OM_USER_PASSWORD" \
--organizationId "$ORG_ID" \
--roles admin,employee
Output:
User created with id 7c2a91be-7f06-4c6e-9c28-2507a5e5992e
yarn mercato auth list-orgs) and that the CLI can connect to the database.OM_PASSWORD_MIN_LENGTH, OM_PASSWORD_REQUIRE_DIGIT, OM_PASSWORD_REQUIRE_UPPERCASE, and OM_PASSWORD_REQUIRE_SPECIAL.