This is a one-off ETL script for migrating user credentials from the Permanent.org application database to FusionAuth, 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 transforms it into the FusionAuth user import schema. This includes spliting the bcrypt hash into the fields FusionAuth expects, as the FusionAuth user import endpoint cannot parse bcrypt hash strings.
Finally, it loads the data into FusionAuth using their bulk user import API.
Copy .env.template
to .env
, set the values, and run npm run start
.