Conversation

thomasmburke

This is implementing the same change as firebase/firebase-admin-go#480 just on this python Admin SDK.

When developers export users from Firebase Auth's backend they arrive with an encoded password hash and salt. This change decodes the password hash and salt, so that it isn't double encoded upon importing these users back to Firebase.

We don't need to change other python samples (e.g. HMAC) that provide password hash and salt as they are being migrated from other auth systems that use other hashing algorithms. It is fair to assume (we won't know) that the password hash and salt from those other backends has been decoded properly.

Tests:

  • If you export a user and use the import code as it is written in the public docs it will successfully import the user, but you will be unable to sign in because of the double encoding effectively changing the password
  • With this decoding you can successfully import a user and sign in after now that the double encoding is removed.

…RL decoded before import to avoid double encoding

Choose a reason for hiding this comment

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

Thank you @thomasmburke !

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

Successfully merging this pull request may close these issues.