Clarix
Authentication

Email & Password

Credential-based authentication flow

Email & Password Authentication

Clarix uses email + password as the primary authentication method. All credentials are managed by Better Auth with Argon2id password hashing.

Sign Up Flow

User enters name + email + password

Better Auth validates (unique email, password policy)

Password hashed with Argon2id

User record created in PostgreSQL

Auto-assigned to default organization

Default role: `read_only`

Session created → redirect to /dashboard

Sign In Flow

User enters email + password

Better Auth looks up user by email

Verify password hash (Argon2id)

Check: user.banned? user.status?

Create session (server-side, stored in DB)

Set session cookie → redirect to /dashboard

Password Policy

RuleRequirement
Minimum length8 characters
ComplexityNo specific requirements (planned: uppercase + number + special)
HistoryNot enforced (planned)
ExpiryNone (planned: 90-day rotation for regulated users)

Failed Login Protection

SettingValue
Max attempts5
Lockout duration30 minutes
Lockout scopePer email address
LoggingAll attempts logged with IP, user agent, timestamp

Password Reset

Currently not implemented. Planned flow:

User clicks "Forgot Password"

Enter email → reset token generated

Email sent with reset link (token expires in 1 hour)

User clicks link → enters new password

Password updated, all sessions invalidated

On this page