Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

PermanentOrg/migrate-permanent-auth0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

migrate-permanent-auth0

TypeScript GPLv3 license No Maintenance Intended

This is a one-off ETL script for migrating user credentials from the Permanent.org application database to Auth0, an authentication vendor.

It connects directly to the Permanent MySQL database, and knows the relevant parts of the database schema at the time it was written.

After extracting the data, it performs two transformations. First, it replaces the PHP-specific $2y$ bcrypt hash type prefix with the standard $2a$, as Auth0 does not recognize that prefix; see also this history of BCrypt variants. Second, it formats the data into Auth0's user import schema.

Finally, it loads the data into Auth0 using their bulk user import API. (If our production data turns out to be larger than the 500KB limit, then this will also handle splitting it into smaller chunks and submitting multiple import jobs.)

Usage

Copy .env.template to .env, set the values, and run npm run start.

About

ETL script to transfer user credentials from Permanent to Auth0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published