Concepts
| Auth0 | Ziqme Auth |
|---|---|
| Tenant | Workspace |
| Application (SPA, native, regular web) | Application: public for SPA and native, confidential for a server |
| API (resource server) and its audience | Another application; its client ID is the audience. Tokens always carry the calling application's or the named application's client ID as aud |
| Universal Login | Hosted login |
| Roles (RBAC) | Per-application roles, in the roles claim |
| Organizations | Organizations: org_id, org_slug, org_roles claims |
| Enterprise connections (SAML) | SSO connections per organization |
| Actions that add custom claims | Claim mappings from user metadata, per application |
| user_metadata, app_metadata | publicMetadata, privateMetadata |
| Log streams | Audit log export and streaming |
| M2M (client credentials) | client_credentials grant, switched on per application |
What to change in your code
- Issuer: https://YOUR_TENANT.auth0.com/ becomes https://auth.ziqme.com (no trailing slash).
- Audience: Auth0 access tokens name an API identifier. Here the audience is a client ID, so validate against your application's client ID.
- Roles: Auth0 needs an Action and a namespaced claim to put roles in a token. Here, ask for the roles scope and read the roles claim.
- PKCE is required for every client. Most Auth0 SDK setups already use it.
- Logout: /v2/logout?returnTo= becomes /end-session?post_logout_redirect_uri=, and the URI must be registered.
Moving users with their passwords
Auth0's user export job leaves password hashes out; Auth0 support provides them on request as a separate file of bcrypt hashes. With both files, people keep their passwords.
- Create the applications and roles first, and the organizations by slug: an import assigns roles and memberships but creates neither.
- Export profiles with the Management API: POST /api/v2/jobs/users-exports with format "json" and the fields email, email_verified, given_name, family_name, user_metadata and app_metadata. Download the file the job links to.
- Ask Auth0 support for a password hash export. It arrives as newline-delimited JSON with each user's email and passwordHash ($2b$10$…).
- Join the two files by email into the Ziqme format, as below.
- Upload the file under Auth admin, Import and export (or POST /api/v1/auth/users/imports). Read the dry-run report: invalid rows, duplicates and unsupported hashes are listed by row number. Then start it.
- The first time each person signs in, Auth replaces the bcrypt hash with its own format. Nothing changes for them.
import { readFileSync, writeFileSync } from 'node:fs'
const lines = file => readFileSync(file, 'utf8').split('\n').filter(Boolean).map(line => JSON.parse(line))
const hashes = new Map(lines('auth0-password-hashes.json').map(u => [u.email.toLowerCase(), u.passwordHash]))
const users = lines('auth0-users.json').map(u => ({
email: u.email,
emailVerified: u.email_verified,
givenName: u.given_name,
familyName: u.family_name,
publicMetadata: u.user_metadata,
privateMetadata: u.app_metadata,
passwordHash: hashes.has(u.email.toLowerCase())
? { algorithm: 'bcrypt', hash: hashes.get(u.email.toLowerCase()) }
: undefined,
}))
writeFileSync('ziqme-users.json', JSON.stringify(users))People who signed in only with a social or enterprise connection have no hash: give them identities: [{ provider, subject }] with the provider key you configured here and the subject from their Auth0 identities array. People with neither get the application's "Set your password" email when you pick that application on the upload, unless it offers emailed links or codes.
Or migrate as people sign in
If you cannot get the hash export, use lazy migration, the equivalent of an Auth0 custom database with import mode. Point it at an endpoint of yours that checks the password against Auth0 (the Resource Owner Password grant on a legacy application) and answers 200 with the person. See "Migrating from your own database" for the request, the signature and an example endpoint.
Not available here
- Actions, Rules or any code that runs inside the sign-in.
- The Management API's full surface: check the API reference for what exists.
Plan for these before you commit to a date. If one of them blocks you, tell us which.