Skip to main content

Overview

Authenticate with SuperBox using Firebase authentication. Supports email/password, Google OAuth, and GitHub OAuth.
Authentication tokens are stored in ~/.superbox/auth.json

Commands

superbox auth register

Create a new SuperBox account.
superbox auth register
Process:
  • Prompts for email and password
  • Creates Firebase account
  • Automatically logs you in
  • Stores tokens locally
Example:
$ superbox auth register
Email: user@example.com
Password: ********
 Successfully registered and logged in

superbox auth login

Log in to your SuperBox account.
superbox auth login [--provider PROVIDER] [--email EMAIL] [--password PASSWORD]

Options

--provider
string
default:"email"
Authentication provider: email, google, or github
--email
string
Email address (for email provider only)
--password
string
Password (for email provider only)

Email/Password Login

$ superbox auth login --provider email
Email: user@example.com
Password: ********
 Successfully logged in

OAuth Device Flow (Google/GitHub)

1

Initiate OAuth Flow

superbox auth login --provider google
# or
superbox auth login --provider github
2

Browser Opens

Browser opens to device verification page
Visit: http://localhost:8000/api/v1/auth/device?code=XXXX-XXXX
Or enter code: XXXX-XXXX
3

Complete Authorization

Authorize in browser, CLI detects completion automatically
4

Token Stored

Authentication tokens saved to ~/.superbox/auth.json
Example:
$ superbox auth login --provider google
Opening browser for Google authentication...
Visit this URL: http://localhost:8000/api/v1/auth/device?code=XXXX-XXXX
Waiting for authentication...
 Successfully authenticated with Google

superbox auth status

Check current authentication status.
superbox auth status
Example:
$ superbox auth status
Logged in as: user@example.com
Provider: google

superbox auth refresh

Manually refresh authentication token.
superbox auth refresh
Example:
$ superbox auth refresh
 Token refreshed successfully

superbox auth logout

Log out from current session.
superbox auth logout
Example:
$ superbox auth logout
 Logged out successfully

Troubleshooting

Manually visit the URL and enter the code:
https://superbox.ai/device?code=ABCD-1234

Next Steps