migration
Bring your users. Keep their passwords.
Three paths — mix them per environment.
1. Bulk import
Push up to 5,000 users per call with their existing password hashes — users sign in like nothing changed:
import
POST /v1/users/import (sk)
{
"source": "firebase",
"users": [{
"phone": "+91...", "email": "a@b.com",
"hash_algo": "firebase_scrypt",
"password_hash": "…",
"hash_params": { "signer_key": "…", "salt_separator": "…", "rounds": 8, "mem_cost": 14 }
}]
}
// adapters: bcrypt · argon2id · scrypt · pbkdf2 · firebase_scrypt · sha2562. Lazy migration
Users who were never imported can still sign in — the first password verify happens against the legacy hash, then rehashes to argon2id transparently:
lazy
POST /v1/users/lazy-login (pk — same surface as normal login)
{ "identifier": "+91...", "password": "•••" }
→ verifies legacy hash → rehashes argon2id → full session3. Federation — keep your IdP
Don't migrate at all: verify external tokens (Firebase/Supabase/Auth0 JWKS) and issue NexAuth sessions on top. Bharat channels + DPDP, your user store stays put.