Skip to content

Account

An Account object represents a user’s authentication credentials within a project. Accounts store the email, password hash, provider information, confirmation state, and active status. Each account links to a Person record in the Identity module through the owner_id field.

Sample Object

{
  "id": "acc_abc123def456",
  "owner_id": "ppl_abc123def456",
  "provider": "OBLAX",
  "email": "jane@example.com",
  "password": "",
  "auth_token": "",
  "refresh_token": "",
  "confirmed": true,
  "active": true,
  "confirmation_token": ""
}

Fields

FieldTypeDescription
idstringUnique identifier for the Account.
owner_idstringUnique identifier of the linked Person record in the Identity module.
providerenumAuthentication provider. One of OBLAX, GOOGLE, FACEBOOK, APPLE, MICROSOFT.
emailstringEmail address associated with the account.
passwordstringPassword hash. Only present on create responses and empty on subsequent reads.
auth_tokenstringOAuth access token from the external provider. Set when provider is not OBLAX.
refresh_tokenstringOAuth refresh token from the external provider. Set when provider is not OBLAX.
confirmedbooleanWhether the account has been confirmed via email.
activebooleanWhether the account is active and allowed to log in.
confirmation_tokenstringToken used to confirm the account. Returned on create, cleared after confirmation.

Actions

Creating an account

Register a new user. Creates a Person record in Identity if one does not exist, assigns a default role, and returns credentials with a confirmation token.

obx app auth:accounts init
| SUCCESS: Auth account initialized
| Edit the initialized account file ./app/auth-accounts/init.json

After editing the template file:

obx app auth:accounts create
| SUCCESS: Auth account created
| The account has been successfully created.

Confirming an account

Confirm an account using the confirmation token returned from account creation. Required before the account can log in.

obx app auth:accounts confirm ab9311310a24a6ddde3c58e61a1bc8aaab3afd6f220ed531d958f41ca315c3e0
| SUCCESS: Auth account confirmed
| The account has been confirmed successfully.

Requesting a password reset link

Generate a password reset token and send it to the account’s email address. The token is returned in the response for testing purposes.

obx app auth:accounts reset-password jane@example.com
| SUCCESS: Password reset link sent
| A password reset link has been sent to the email address.

Resetting a password

Reset the account password using the token obtained from the password reset link endpoint.

No CLI command available. Use the REST or SDK methods.

Listing all accounts

Retrieve all accounts in the project. Requires authentication.

obx app auth:accounts list
| SUCCESS: Auth accounts listed
| All auth accounts have been listed successfully.

Enabling or disabling an account

Enable or disable an account by ID. Disabled accounts cannot log in but retain all data.

obx app auth:accounts enable acc_abc123def456
| SUCCESS: Auth account enabled
| The auth account has been enabled successfully.
obx app auth:accounts disable acc_abc123def456
| SUCCESS: Auth account disabled
| The auth account has been disabled successfully.