I am trying to import users from a Rails database into Firebase auth. The passwords were hashed by the
authlogic gem/library in ruby using their SHA512 implementation.
Unfortunately, it seems they may have gotten it wrong. At least they're doing it differently from firebase. Specifically, there is a
hexdigest method being called that returns a regular sting with hex characters. When repeating rounds of the hashing, they hash this utf-8 string directly instead of the bytes represented by the hex characters. Firebase, on the other hand, hashes the bytes represented by that string. For a demo of both methods in both ruby and node.js, see
this issue on firebase-admin-node and the comments toward the bottom. There I reproduce authlogic's hashed passwords exactly using the "hash the string" method, but the correct way to import users into firebase is to use the "hash the bytes" method.
Given this, it seems that importing users will be impossible unless firebase auth recreates this "incorrect" hashing method. Is that correct?
Given the popularity of authlogic, is there any sense in which this would be a reasonable feature request? Ability to import users is a big reason I'm able to use to pitch firebase / google identity platform over AWS Cognito (the one that Product will bite into, they don't care nearly as much as I do that GCP is just much nicer to use)