Login & MFA — bRRAIn Docs

Authentication on bRRAIn — passwords, MFA, sessions, SSO, and session security.

Login & MFA

Authentication is the front door. This page covers how bRRAIn authenticates members and how to harden it.

Password authentication

Storage

Passwords are stored as Argon2id hashes with per-user salt and bRRAIn-wide pepper. We do not store raw passwords.

Hash parameters tune to current security recommendations and are revisited annually.

Requirements

We enforce:

  • Minimum 12 characters.
  • Cannot match the user's email or display name.
  • Cannot match any of the most-common-password lists (we check against a large corpus).
  • Cannot match any of the user's previous passwords (last 10).

We don't enforce composition rules (no "must contain a digit") because they reduce real password strength. Length is what matters.

Reset

Forgot-password emails carry a one-time link valid for 60 minutes. Reset triggers MFA challenge if MFA is enrolled.

Sign-in after reset invalidates all other sessions.

Rotation

We don't force routine password rotation. Forced rotation reduces password quality (people pick easier passwords to remember). We do force rotation on:

  • Suspected exposure (your email appeared in a breach corpus).
  • Sovereign-initiated reset.
  • Significant authentication anomaly.

Multi-factor authentication

Channels

Channel Protocol Best for
TOTP RFC 6238 Strong, simple, offline-capable. Recommended.
SMS OTP via your phone number Backup only. SIM-swap risk.
Email (recovery email) OTP via secondary email Backup only.

We recommend an authenticator app (TOTP), with SMS or email as a backup channel.

Recovery codes

When you enroll TOTP we issue 10 single-use recovery codes. Save them in your password manager or print them. Each is one-shot.

Setting up MFA

Each member turns on MFA for their own account. In your account settings at app.brrain.io/settings, go to Security → Multi-factor authentication (optional) and click Enable MFA. Scan the code with an authenticator app and enter the 6-digit code to confirm. You can also pick a backup channel (SMS or email), and your backup codes are shown once at the end. From then on you are asked for a code when you sign in. Disable in the same place turns MFA off.

MFA is optional. There is no organization-wide setting that requires it, in the Console or elsewhere.

Step-up authentication

Sensitive actions can require fresh MFA even within an existing session:

  • Changing your password.
  • Adding or removing an MFA channel.
  • Editing billing.

Sessions

Lifetime

Default session lifetime is 30 days.

Sessions expire on:

  • Their natural expiration.
  • Sign-out.
  • Password reset.
  • Significant authentication context change (IP geographic move with no recent activity).

Cookies

Session cookies are:

  • Scoped to *.brrain.io (so you stay signed in across surfaces).
  • HttpOnly (no JavaScript access).
  • Secure (HTTPS-only).
  • SameSite=Lax (defends against most CSRF).
  • Refreshed on each request to extend the session.

Social sign-in

Members can sign in with Google or GitHub from the sign-in page. We accept the sign-in only when the provider confirms the email address, and we link it to an existing account with the same email. The resulting session is the same as a password session, and the same session rules apply. See Sign in & accounts.

Login with bRRAIn

bRRAIn acts as an OAuth 2.0 and OpenID Connect provider for other applications. PKCE is required, refresh tokens rotate, and reuse of a rotated refresh token revokes the whole chain. See Sign in & accounts.

Sign-in forms and CSRF protection

Sign-in, registration and password-reset pages are not cached by browsers. Each view starts a fresh security token, and forms restored from the browser's back button are refreshed, so a stale page cannot submit an out-of-date token.

Single sign-on (SSO)

Single sign-on uses SAML 2.0. It is not set up in the Console. Your organization's page in your bRRAIn account at brrain.io/organizations has an SSO tab that shows:

  • The SSO Status (for example Not configured).
  • The Service Provider endpoints to give your identity-provider team: Entity ID (SP), ACS URL, Metadata URL, the Name ID format (email address) and the required attributes (email, given_name, family_name).
  • The identity-provider fields (IdP Entity ID, SSO URL, X.509 certificate). You cannot save these yourself. Use Contact sales to enable to have SSO turned on for your organization.

Service accounts

Bots, CI, and SDK callers use service-account credentials:

  • Long-lived bearer tokens, scoped to specific roles and zones.
  • Or short-lived OIDC tokens (recommended for CI environments).
  • Configurable rotation policies.
  • All actions logged with the service account as actor.

Service accounts can't have MFA. Their security is controlled through scope minimality and rotation.

Anomaly detection

We watch for patterns that suggest compromise:

  • Sign-in from a new geography with no prior activity.
  • Multiple failed sign-in attempts.
  • Use of leaked credentials (we check against breach corpora).
  • Session hijack indicators (cookie used from unexpected device).

Anomalies trigger:

  • A step-up MFA challenge.
  • A notification to the affected member.
  • A high-severity audit event for the organization.

Repeated anomalies on a member trigger automatic account suspension pending review.

Account lockout

After 10 failed sign-in attempts in a 15-minute window, the account locks for 15 minutes. Locked accounts can be unlocked by:

  • Waiting out the lockout window.
  • Sovereign action.
  • Verified-identity reset via support.

Where to next