firebase-to-supabase-auth-migrator
A bunch of simple scripts to help migrate your Firebase Auth users into Supabase Auth.
These scripts were pulled out from the migration scripts that was used to migrate ~200k users for Mobbin.
Notes
- The scripts do NOT migrate users from Firebase Auth who are using password sign-ins. If you wish to migrate users that are using password sign-ins, check out this Discord thread for a possible solution.
- The scripts requires that your Firebase Auth users must have an email. It is possible for Firebase Auth to not retrieve email during sign-ins if you did not specify sufficient scopes (e.g. the
email
scope for Facebook).
Installation
Install dependencies
yarn
or npm install
- Ensure you have access to the Firebase project you are about to export from.
Usage
- Ready your:
- Firebase project ID
- Supabase Postgres connection string — you can grab it from
https://app.supabase.io/project/<ref>/settings/database
- Download Supabase Certificate
- copy it to the root of the project
- rename it to
supabase-ca-cert.crt
yarn setup
yarn export-users
yarn import-users
Permission denied error
- If you faced an error with permission denied, please do the below
- execute this in Supabase sql query
alter user postgres with superuser;
- after your migration done, please revert the change above with
alter user postgres with nosuperuser;