Migrate from Auth0
Step-by-step guide to migrating your application from Auth0 to Wocha
This guide covers migrating from Auth0 to Wocha, including users, connections, and application configuration.
Overview
| Auth0 Concept | Wocha Equivalent |
|---|---|
| Tenant | Tenant |
| Application | Application |
| Connection | Connection |
| Organization | Organisation |
| Action | Action |
| Rule (deprecated) | Token Rule |
| API (audience) | Product |
| Role/Permission | SpiceDB Permission |
| Log Stream | Event Stream / Webhook |
| Management API | Customer API |
| Universal Login | Hosted Login (Kratos) |
Step 1: Create your Wocha tenant
Step 2: Export users from Auth0
Use the Auth0 Management API or Dashboard to export your users:
Step 3: Import users to Wocha
CLI migration (recommended)
Always preview the migration first:
The --dry-run flag parses and validates Auth0 users without creating anything in Wocha. It reports user counts, duplicate emails, and missing fields, and writes a JSON migration plan to wocha-migrate-plan-auth0-*.json.
After import, verify the migration:
Validation checks that all Auth0 users exist in Wocha (matched by email) and reports any discrepancies.
Manual import via SDK
Step 4: Configure connections
Map your Auth0 connections to Wocha:
- Social connections (Google, GitHub, etc.) — configure in Console under Connections > Social
- Enterprise SSO (SAML, OIDC) — configure in Console under Connections > Enterprise
- SCIM directories — configure in Console under Connections > SCIM
Step 5: Update your application
Replace Auth0 SDK with Wocha SDK:
Next.js
Replace the Auth0 handler:
React SPA
Step 6: Migrate webhooks
Auth0 Actions/Log Streams map to Wocha webhooks:
Step 7: Update environment variables
| Auth0 | Wocha |
|---|---|
AUTH0_SECRET | WOCHA_SECRET |
AUTH0_BASE_URL | NEXT_PUBLIC_APP_URL |
AUTH0_ISSUER_BASE_URL | WOCHA_ISSUER |
AUTH0_CLIENT_ID | WOCHA_CLIENT_ID |
AUTH0_CLIENT_SECRET | WOCHA_CLIENT_SECRET |