Skip to content

lineCode/firebase-to-supabase-auth-migrator

 
 

Repository files navigation

⚠️ This repository is not actively maintained. Please refer to the official guides on migrating to Supabase moving forward.

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

  1. yarn or npm install
  2. Ensure you have access to the Firebase project you are about to export from.

Usage

  1. Ready your:
    1. Firebase project ID
    2. Supabase Postgres connection string — you can grab it from https://app.supabase.io/project/<ref>/settings/database
    3. Download Supabase Certificate
      • copy it to the root of the project
      • rename it to supabase-ca-cert.crt
  2. yarn setup
  3. yarn export-users
  4. 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;

About

Collection of scripts to migrate from Firebase Auth users to Supabase Auth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%