drift account
Your identity against the platform, a different thing from the auth your own app uses. Authentication keeps the three apart.
| Command | Description |
|---|---|
drift account create | Sign up. Prompts for username, email, and password, then verifies by email. --invite-code is required while signup is invite-only. |
drift account login | Log in and store a session |
drift account reset-password | Emails you a reset code, then walks you through setting a new password |
drift account delete [--yes] | Delete your account and everything tied to it: every slice, every record, all object storage. Irreversible; asks twice, and the second prompt makes you type your username. |
Signing up
Signup is two steps. create posts your details, the platform emails an 8-digit code, and you type it back to finish. Under invite-only mode the invite code takes the place of that email check, so the CLI skips the prompt and says so.
$ drift account create --invite-code DRIFT-XXXX
Username: alice
Email: alice@example.com
Password: ********
Sending verification code...
Invite-only alpha: skipping email verification (your invite code is the gate).An invite is minted for one email address, so a code that reached you by another route won't sign you up as someone else. For CI, pass --username, --email, and --password-stdin. Once you're logged in the CLI keeps your session and refreshes it for you; you won't be asked again on this machine.
--password leaks into ps and your shell history.
ps output and your shell history. --password-stdin is the one to reach for in CI.The session on disk
Your login and active slice live in ~/.drift/session.json (mode 0600, inside a 0700 directory), bound to a per-machine device_id beside it. The active slice is preserved across logins. Every authenticated request carries:
Authorization: Bearer <jwt>, your identityX-Slice: <active-slice>, the target slice
Tokens refresh automatically on a 401; if the refresh fails you're prompted to log in again. Authentication has the token pair's lifetimes and what happens when a spent refresh token is replayed.