Skip to content

Commit d7772f9

Browse files
authored
password_hash obtained from Firebase Auth backend needs to be base64URL decoded before import to avoid double encoding (#652)
Co-authored-by: Thomas Burke <tomburke@google.com>
1 parent 6c565f2 commit d7772f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: snippets/auth/index.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,8 @@ def import_with_scrypt():
571571
auth.ImportUserRecord(
572572
uid='some-uid',
573573
email='user@example.com',
574-
password_hash=b'password_hash',
575-
password_salt=b'salt'
574+
password_hash=base64.urlsafe_b64decode('password_hash'),
575+
password_salt=base64.urlsafe_b64decode('salt')
576576
),
577577
]
578578

0 commit comments

Comments
 (0)