Overview
ZapDev uses OAuth 2.0 to securely connect with external services. OAuth allows ZapDev to access your Figma designs and GitHub repositories without ever seeing your passwords.Supported Providers
ZapDev integrates with:- Figma - Import design files and components
- GitHub - Import repositories and source code
How OAuth Works
The OAuth flow in ZapDev:Setting Up Figma OAuth
Connect your Figma account to import designs.Authorization Process
Trigger OAuth Flow
From any project, click:
- Download icon (⬇️) in message form
- “Import from Figma”
Review Permissions
ZapDev requests:
- File access - Read your Figma files
- File metadata - Access file names, versions, and structure
- Browse your Figma files
- Read design elements and styles
- Extract component information
- Generate code from designs
Figma Connection Details
Once connected, ZapDev stores:Using Figma Connection
After authorization:- Browse all your Figma files
- Select designs to import
- ZapDev uses the token to fetch design data
- Designs are converted to code
Setting Up GitHub OAuth
Connect your GitHub account to import repositories.Authorization Process
Review Permissions
ZapDev requests:
- Repository access - Read repository contents
- Repository metadata - Access repo names and descriptions
- All repositories - Grant access to all your repos
- Selected repositories - Choose specific repos only
Select Repository Access
Choose which repositories ZapDev can access:For personal use:
- Select specific repositories you want to import
- Choose “All repositories”
GitHub Connection Details
Stored connection data:Using GitHub Connection
After authorization:- View list of accessible repositories
- Filter by organization or personal repos
- Select repository and branch to import
- ZapDev clones the repository contents
Managing OAuth Connections
Viewing Connected Accounts
Check which services are connected:Updating Permissions
To modify granted permissions:Adjust Permissions
On the provider’s authorization page:
- For GitHub: Change repository selection
- For Figma: Permissions are fixed (files:read)
Revoking Connections
Disconnect a service:Revoke from Provider Side
You can also revoke access directly from the provider: Figma:- Go to Figma Settings → Account
- Find “Authorized applications”
- Remove ZapDev
- Go to GitHub Settings → Applications
- Find “Authorized OAuth Apps”
- Revoke ZapDev access
Revoking from the provider side immediately invalidates tokens. You’ll need to re-authorize in ZapDev for future imports.
Token Management
Access Tokens
ZapDev manages tokens automatically:- Encryption - All tokens encrypted in database
- Expiration - Tokens checked before each use
- Refresh - Expired tokens automatically refreshed
- Revocation - Invalid tokens trigger re-auth
Token Lifecycle
Token Scope
Each provider grants specific scopes: Figma:files:read- Read access to files
repo- Repository accessread:user- Read user profile (optional)
Security Best Practices
How ZapDev Protects Your Tokens
Encryption at Rest - Tokens encrypted in Convex database using industry-standard encryption.
HTTPS Only - All OAuth flows and API calls use secure HTTPS connections.
Minimal Scope - Request only necessary permissions for core functionality.
No Sharing - Tokens never shared with third parties or other users.
Automatic Expiration - Short-lived tokens with automatic refresh.
Revocable - You can disconnect services anytime.
User Responsibilities
Troubleshooting OAuth
Authorization Failed
Symptoms: Redirect fails or shows error Solutions:- Clear browser cookies and cache
- Disable browser extensions temporarily
- Try incognito/private mode
- Use different browser
- Check if provider is down
Token Expired
Symptoms: Import fails with “Unauthorized” error Solutions:- Token should auto-refresh
- If refresh fails, disconnect and re-authorize
- Check if you revoked access on provider side
Can’t Access Files/Repos
Symptoms: Empty file list or missing repositories Solutions:- Figma: Verify file ownership or sharing permissions
- GitHub: Check repository access scope
- Re-authorize with broader permissions
- Ensure files/repos not deleted
Connection Shows as Inactive
Symptoms: Connection exists but marked inactive Solutions:- Revoke and re-authorize
- Check provider account status
- Verify email address matches
- Contact support if issue persists
OAuth Flow Endpoints
For developers integrating with ZapDev:Figma OAuth
GitHub OAuth
Data Retention
What We Store
- Access tokens (encrypted)
- Refresh tokens (encrypted)
- Token expiration dates
- Granted scopes
- Provider user IDs
- Connection timestamps
What We Don’t Store
- Your Figma/GitHub passwords
- Complete file/repo contents (only during active import)
- Unencrypted tokens
- Provider session data
Deletion Policy
When you disconnect a service:- Access tokens deleted immediately
- Connection records removed
- Imported content remains (orphaned)
- Re-authorization creates new connection
API Rate Limits
ZapDev respects provider rate limits: Figma API:- 1000 requests per hour per user
- Automatic retry with backoff
- 5000 requests per hour for authenticated users
- Cached repository data when possible
If you hit rate limits, wait and retry. ZapDev automatically handles rate limit errors with exponential backoff.