Skip to content

Conversation

@thomasmburke
Copy link
Contributor

Developers are having trouble migrating users because of the issue described here. This update looks to update the snippet used in https://firebase.google.com/docs/auth/admin/import-users#import_users_with_firebase_scrypt_hashed_passwords to help users migrate users and avoid issues surrounding double base64 encoding.

@thomasmburke
Copy link
Contributor Author

So the update for this doc snippet updating two things:
1.) Decoding the user password hash
- currently we don't so when a dev performs import the password hash is getting double encoding leading to invalid password errors when the correct password is provided for a newly imported user
2.) Updating the decoding functions so the hash.Scrypt key uses standard base64 encoding and user password hashes uses base64URL encoding
- currently the snippet doesn't decode the use password hash, but it should using a base64URL encoding

@lahirumaramba lahirumaramba self-requested a review February 15, 2022 22:43
@lahirumaramba lahirumaramba self-assigned this Feb 15, 2022
Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @thomasmburke ! LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update snippet for importing users with Firebase scrypt hashed passwords

3 participants