Skip to main content

Authentication

Authenticate with Wafer to access cloud features, workspaces, and the AI agent proxy. Authentication uses OAuth with GitHub or other providers.

Quick Start

# Login with default provider (GitHub)
wafer auth login

# Check authentication status
wafer auth whoami

# Logout
wafer auth logout

Commands

wafer auth login

Authenticate with Wafer services:
wafer auth login
This opens your browser for OAuth authentication. After approval, your credentials are stored locally. Options:
OptionDescription
--providerAuthentication provider (default: github)
--no-browserPrint URL instead of opening browser
Example with specific provider:
wafer auth login --provider github

wafer auth logout

Sign out and clear stored credentials:
wafer auth logout

wafer auth whoami

Display current authenticated user:
wafer auth whoami
Output:
Logged in as: username
Email: [email protected]
Provider: github

Provider Management

Manage additional authentication providers for services like cloud GPU providers.

wafer auth providers status

Check authentication status for all providers:
wafer auth providers status
Output:
PROVIDER      STATUS
github        authenticated
runpod        not configured
anthropic     configured (via env)

wafer auth providers login

Authenticate with a specific provider:
wafer auth providers login <provider>
Supported providers:
  • github — GitHub OAuth
  • runpod — RunPod API key
  • digitalocean — DigitalOcean token
Example:
wafer auth providers login runpod

wafer auth providers logout

Sign out from a specific provider:
wafer auth providers logout <provider>

API Keys

For the AI agent, you can use your own Anthropic API key instead of Wafer’s proxy:
# Set via environment variable
export ANTHROPIC_API_KEY=sk-ant-...

# Use with agent
wafer agent --no-proxy "Your question"
For Wafer API access without OAuth:
# Set API key
export WAFER_API_KEY=your-api-key

# Or configure in settings
wafer config set api_key your-api-key

Credential Storage

Credentials are stored securely in:
PlatformLocation
macOSKeychain
LinuxSecret Service / encrypted file
WindowsCredential Manager
To view stored credentials location:
wafer config show

Troubleshooting

Use the --no-browser flag and copy the URL manually:
wafer auth login --no-browser
  • Check internet connectivity
  • Ensure popup blockers aren’t blocking the OAuth window
  • Try logging out and back in:
    wafer auth logout && wafer auth login
    
Verify the key is set correctly:
echo $WAFER_API_KEY
wafer config show

Next Steps