Sign-in

How people sign in to 3AM, how the first owner is created, what the admin token is for, setting up email, and who may sign in.

People sign in one of four ways. Every tier has all of them.

WayForSet up in
Single sign-on (OIDC)Entra ID, Okta, Ping, Keycloak, ADFSSettings → How people sign in (SSO)
Directory password (LDAP)LDAP or Active Directory, where no identity provider is reachableThe same
A code by emailEveryone elseSettings → E-mail sign-in
A passwordOne person who can't receive a code, such as an auditorTeam → Password

The first owner

A new install's sign-in page asks for the admin token the installer printed, and your email. That makes you the owner. The same page lets you add a Resend key, so colleagues can sign in with emailed codes straight away.

Setting up email

Emailed codes need a mail provider. Without one, only the admin token gets in.

ProviderHow
ResendPaste the API key in Settings → E-mail sign-in, or install with --resend-key-file FILE
Any SMTP server (SES, Postmark, Microsoft 365, Google Workspace, your relay)Fill in Settings → E-mail sign-in, or install with --smtp-host H --smtp-user U --smtp-password-file F

The sender must be on a domain your provider has verified. Resend's sandbox sender only delivers to the Resend account's own address, so verify your domain in Resend first. Send me a test e-mail proves it works before anyone needs a code.

On Kubernetes, use the chart's mail.resendKeySecret or mail.smtp.* values.

How emailed codes work

The person enters their email, and 3AM sends a six-digit code. It works once, for 10 minutes. 3AM gives the same answer whether or not an address has access, so the sign-in page never reveals who's a user.

The admin token

After the first owner, the admin token has two jobs:

  • Automation. Scripts and CI can call the API with Authorization: Bearer <admin token>, with owner rights.
  • Break-glass. When codes can't be sent, because mail isn't set up or the provider is down, the sign-in page offers the token instead. Each use is logged, and the console shows a banner until mail works again.

Otherwise, the admin token can't be used to sign in.

InstallWhere to find it
Linux serverPrinted once by the installer. Later: podman cp 3am-core:/var/lib/3am/admin-token - | tar -xO
Kuberneteskubectl -n 3am get secret threeam-admin -o jsonpath='{.data.token}' | base64 -d
Your own tokenSet THREEAM_ADMIN_TOKEN, or the chart's adminToken.existingSecret

Who may sign in

Only people an admin has added, or members of your directory's mapped groups. Team → Who may sign in narrows it further:

  • Allowed domains. A new install starts with the first owner's domain.
  • Blocked domains and addresses, as you choose. Throwaway email services are always refused, and public webmail can be too.

Tightening the rules signs out anyone now outside them, at once. A change that would lock out every owner is refused.

Passwords for one person

For a reviewer, auditor or guest without a mailbox on your domain. Only an owner can give one, and not to another owner or a directory user. The password is shown once, and ends after 7, 30 or 90 days, or never. Five wrong tries lock the address for 15 minutes.

Sessions

A session ends after 12 hours idle, or 7 days, whichever comes first. It also ends when the person signs out, closes the tab, is disabled, or has their role changed.

API

CallWhoWhat it does
POST /v1/auth/request {email}anyoneSend a code
POST /v1/auth/verify {email, code}anyoneSign in with the code: returns {token, user}
POST /v1/auth/password {email, password}anyoneSign in with a password
POST /v1/auth/logoutsigned inEnd this session
POST /v1/auth/bootstrap {email, name}admin tokenCreate the first owner, once
GET, PUT /v1/settings/mail; POST /v1/settings/mail/testviewer, adminThe mail provider
GET, PUT /v1/settings/accessviewer, adminWho may sign in

Every sign-in, code and change is recorded in the audit log under identity.* events.

On this page