auth
snug auth <COMMAND>Authentication and user management.
Subcommands
| Command | What it does |
|---|---|
login | Log in and store credentials (interactive or with --email/--password) |
signup | Sign up a new account and store credentials |
whoami | Show who you're logged in as |
export | Export stored access token to stdout (for scripting) |
logout | Log out - revokes server session and removes stored credentials |
me | Get current user profile |
profile | Get a user's profile by ID (self or admin), with optional ?include= expansions |
refresh | Refresh an access token |
session | Session management |
password | Password management |
email | Email verification |
magic-link | Magic link authentication |
api-key | API key management |
org | Organization management |
2fa | Two-factor authentication management |
account | Linked OAuth account management |
passkey | Registered passkeys (registering one needs a browser authenticator) |
external-provider | External token-trust providers whose JWTs the platform accepts (admin) |
admin | Admin user management |
idp | Enterprise SSO identity providers for an organization |
sso-discover | Ask which identity provider serves an email address |
sso-exchange | Redeem the single-use code a federated sign-in redirects with |
Run snug auth <command> --help for that command's own options.
The global options apply everywhere.
Examples
snug auth login
snug auth login --email user@example.com --password s3cret!
snug auth signup
snug auth signup --email agent@example.com --password SuperSecret123!
snug auth whoami
snug auth export
snug auth logout
snug auth idp create --org org_abc --name 'Acme Okta' --client-id 0oa1 --client-secret s3cret \
--authorization-endpoint https://acme.okta.com/oauth2/v1/authorize \
--token-endpoint https://acme.okta.com/oauth2/v1/token \
--userinfo-endpoint https://acme.okta.com/oauth2/v1/userinfo --scope openid --scope email
snug auth idp drift --org org_abc --provider idp_123
snug auth idp add-domain --org org_abc --provider idp_xyz --domain acme.com
snug auth idp verify-domain --org org_abc --provider idp_xyz --domain-id dom_123
snug auth me
snug auth profile usr_abc123 --include guild_members,org_members
snug auth refresh --refresh-token <token>
snug auth session list
snug auth session current
snug auth session revoke --session-id sess_abc123
snug auth password change --current oldpass --new newpass
snug auth password forgot --email user@example.com
snug auth password reset --token <reset-token> --new-password newpass
snug auth email verify-send
snug auth email verify --token <verification-token>
snug auth magic-link request --email user@example.com
snug auth magic-link verify --token <magic-link-token>
snug auth api-key create --name 'My Key' --scopes 'kv:write,leaderboard:read'
snug auth api-key list
snug auth api-key get --id ak_abc123
snug auth api-key revoke --id ak_abc123
snug auth org create --name 'My Org' --slug my-org
snug auth org list
snug auth org get --id org_abc123
snug auth org update --id org_abc123 --name 'New Name'
snug auth org delete --id org_abc123
snug auth org invite --org-id org_abc123 --email dev@example.com --role member
snug auth org invitations --org-id org_abc123
snug auth org my-invitations
snug auth org accept-invite --invitation-id inv_abc123
snug auth org decline-invite --invitation-id inv_abc123
snug auth org members --org-id org_abc123
snug auth org update-role --org-id org_abc123 --member-id mid_abc123 --role admin
snug auth org remove-member --org-id org_abc123 --member-id mid_abc123
snug auth org set-active --org-id org_abc123
snug auth org clear-active
snug auth org check-slug --slug my-org
snug auth 2fa status
snug auth 2fa setup
snug auth 2fa verify-setup --code 123456
snug auth 2fa disable --code 123456
snug auth 2fa regenerate-backup --code 123456
snug auth passkey list
snug auth passkey rename --id pk_abc123 --name 'Work laptop'
snug auth passkey delete --id pk_abc123
snug auth external-provider create --provider-id clerk --name Clerk --algorithm RS256 \
--issuer https://clerk.example.com --jwks-url https://clerk.example.com/.well-known/jwks.json
snug auth external-provider list
snug auth external-provider get --provider-id clerk
snug auth external-provider update --provider-id clerk --enabled false
snug auth external-provider delete --provider-id clerk
snug auth account list
snug auth account unlink --provider google
snug auth admin users --limit 50
snug auth admin users --query alice --filter 'banned[eq]=false' --filter 'role[eq]=admin'
snug auth admin user --id usr_abc123
snug auth admin user-update --id usr_abc123 --role admin --email-verified true
snug auth admin user-ban --id usr_abc123 --reason 'ToS violation'
snug auth admin user-unban --id usr_abc123
snug auth admin user-delete --id usr_abc123
snug auth admin sessions --filter 'user_id[eq]=usr_abc123'
snug auth admin session-revoke --id sess_abc123
snug auth admin user-impersonate --id usr_abc123
snug auth admin user-create-batch --file users.jsonNext
- auth guide - what the service does and when to reach for it.
- API reference - every endpoint these commands call.
- CLI reference - global options, output modes, and exit codes.
