Closed Galadros closed 4 years ago
Is there a Go API proposal for the changes made here? I feel like instead of introducing a new InputOrder
type and adding new fields to all hash types, we should just introduce 2 new functions:
func WithPasswordFirstHash(h UserImportHash) UserImportOption
func WithSaltFirstHash(h UserImportHash) UserImportOption
Usage example:
h := &hash.SHA512{
Rounds: 1024,
}
result, err := client.ImportUsers(ctx, users, auth.WithPasswordFirstHash(h))
if err != nil {
log.Fatalln(err)
}
This way the only new additions are the 2 helper functions, and we can handle the input order parameter in just one place instead of many.
Allow users to specify inputHashOrder (salt first or password first) for hmac{md5, sha1, sha256, sha512} and {sha1, sha256, sha512}, persuant to an internal API proposal (similar features are being introduced for each Firebase Admin language). Also updated CONTRIBUTING.md to explain why some tests will fail for a non-GCIP Firebase project.
RELEASE NOTE: Implemented support for specifying password-salt order in hash configurations used when importing users.