Overview
The Developer Tools section provides essential utilities for developing and testing your Better Auth integration. Test OAuth flows, validate configuration, generate secrets, decode JWTs, check password strength, and export data.Accessing Developer Tools
Navigate to Tools from the main sidebar to access all developer utilities.Available Tools
OAuth Testing
Test OAuth Providers
Test your OAuth provider configurations with real authentication flows. Supports all Better Auth OAuth providers including GitHub, Google, Discord, Microsoft, and more.
How to Test OAuth
Select Provider
Choose from your configured OAuth providers:
- GitHub
- Discord
- Microsoft
- And many more…
Start Test
Click Test to initiate OAuth flow:
- Opens popup window with provider login
- Authenticates with OAuth provider
- Returns to Studio with results
OAuth Test Output
Successful test shows:- User name and email from provider
- OAuth account created or linked
- Session established
- Test duration
- Error message
- Possible causes
- Configuration suggestions
Configuration Validator
Validate Better Auth Config
Analyze your Better Auth configuration for errors, warnings, and best practice violations.
Running Validation
Run Checks
Validator automatically checks:
- Required configuration fields
- Plugin compatibility
- Database adapter setup
- OAuth provider configuration
- Security settings
- Email provider setup
Review Results
Results are categorized:
- Errors (red) - Must fix
- Warnings (yellow) - Should review
- Passes (green) - Configured correctly
Validation Categories
Security Checks
Security Checks
- Secret key strength
- Session expiration settings
- CORS configuration
- HTTPS enforcement
- Cookie security flags
Plugin Checks
Plugin Checks
- Plugin compatibility
- Required dependencies
- Plugin configuration
- Conflicting plugins
Database Checks
Database Checks
- Adapter configuration
- Database connection
- Schema compatibility
- Migration status
OAuth Checks
OAuth Checks
- Provider credentials
- Redirect URI configuration
- Scope settings
- Provider-specific settings
Database Connection Test
Test Database
Verify your database connection and adapter configuration.
Connection Check
Tests:
- Database reachability
- Adapter initialization
- Query execution
- Schema validation
Secret Generator
Generate Secure Secrets
Create cryptographically secure secrets for
BETTER_AUTH_SECRET and other sensitive configuration.Generate a Secret
Generate
Click Generate SecretOutput includes:
- Secret value (copyable)
- Format and length
- Entropy bits
.envformat example
Recommended settings:
- Length: 32 bytes minimum
- Format: Hex (more compatible)
- Always use environment variables, never hardcode
Password Hasher
Hash Passwords
Generate password hashes for testing or migration purposes.
Enter Password
- Type or paste password
- Optionally add salt
- Choose hash algorithm:
- SHA-256 (default)
- SHA-384
- SHA-512
- Select encoding:
- Hex (default)
- Base64
- Base64URL
Password Strength Checker
Check Password Strength
Test passwords against your Better Auth password requirements.
JWT Decoder
Decode & Verify JWTs
Decode JWT tokens and verify signatures.
UUID Generator & Validator
Generate UUIDs
Create UUID v4 identifiers or validate existing UUIDs.
Generate UUIDs
Validate UUIDs
Token Generator
Generate API Keys & Tokens
Create API keys or custom JWT tokens for testing.
Configure JWT (if JWT selected)
- Subject - User ID or identifier
- Audience - Target application
- Expires In - Minutes until expiration
- Secret - Signing secret
- Custom Claims - Additional JSON data
Data Export
Export Database Data
Export users, sessions, organizations, and other data to JSON or CSV.
OAuth Credentials Helper
Get OAuth Credentials
Fetch test OAuth credentials from Better Auth Studio backend for development.
Fetch Credentials
Click Fetch CredentialsReturns:
- Client ID - OAuth client ID
- Client Secret - OAuth secret (hidden by default)
- Redirect URI - Configured callback URL
This uses Better Auth Studio’s test credentials for development. Use your own credentials in production.
Migration Helpers
Run Migrations
Migrate users from other authentication providers to Better Auth.
Supported Migrations
Clerk
Migrate from Clerk:
- Downloads Clerk CSV export
- Fetches REST API data
- Preserves passwords and TOTP secrets
- Respects Better Auth plugins
Supabase
Planned migration from Supabase:
- Export auth.users and auth.identities
- Preserve password hashes
- Support incremental migrations
Auth0
Planned migration from Auth0:
- Use Management API bulk exports
- Maintain password hash compatibility
- Migrate applications and roles
NextAuth.js
Planned migration from NextAuth.js:
- Read existing NextAuth database
- Move refresh tokens and OAuth profiles
- Support multiple database adapters
Running Clerk Migration
Custom Migration Script
Write your own migration:Tool Categories
Tools are organized by function:- OAuth - OAuth provider testing and credentials
- Database - Connection testing and data export
- Testing - Password checking, JWT decoding
- Utilities - Secret generation, UUID creation, token generation
- Migration - Provider migration tools
Best Practices
Test in Development
Always test OAuth, migrations, and configurations in development before production.
Use Strong Secrets
- Generate secrets with 32+ bytes
- Use hex encoding for compatibility
- Never commit secrets to version control
Validate Configuration
- Run config validator before deploying
- Fix all errors
- Address warnings when possible
Security Considerations
- Restrict Access - Only allow trusted developers to access Tools
- Use Test Accounts - OAuth tests create real accounts; use test users
- Protect Secrets - Never share generated secrets or paste them publicly
- Development Only - Some tools (like migration) should only run in dev
- Review Migrations - Always review migration scripts before execution
Troubleshooting
OAuth test popup blocked
OAuth test popup blocked
- Allow popups for Better Auth Studio domain
- Check browser popup settings
- Try different browser
OAuth test times out
OAuth test times out
- Verify OAuth provider credentials are correct
- Check redirect URI matches configuration
- Ensure OAuth app is not suspended
- Review Better Auth logs for errors
Cannot write to .env file
Cannot write to .env file
Only available in self-hosted mode:
- Verify file system permissions
- Check
.envfile exists and is writable - Ensure running in self-hosted deployment
Config validation shows false errors
Config validation shows false errors
- Ensure using latest Better Auth version
- Check plugin compatibility
- Review Better Auth documentation for changes
API Reference
Developer tools use these endpoints:GET /api/tools/oauth/providers- List OAuth providersPOST /api/tools/oauth/test- Start OAuth testGET /api/tools/oauth/status- Check OAuth test statusPOST /api/tools/validate-config- Validate configurationGET /api/database/test- Test database connectionPOST /api/tools/generate-secret- Generate secretPOST /api/tools/password-strength- Check passwordPOST /api/tools/migrations/run- Execute migration
Related Features
- User Management - Test tools create users
- Session Management - OAuth tests create sessions
- Event Tracking - Tool actions generate events