Skip to content

Commit 95e5427

Browse files
authored
Update passwordHash and passwordSalt to be base64 decoded before user import (#775)
1 parent e8ec68c commit 95e5427

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/com/google/firebase/snippets/FirebaseAuthSnippets.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@ public void importWithScrypt() {
569569
List<ImportUserRecord> users = Collections.singletonList(ImportUserRecord.builder()
570570
.setUid("some-uid")
571571
.setEmail("[email protected]")
572-
.setPasswordHash("password-hash".getBytes())
573-
.setPasswordSalt("salt".getBytes())
572+
.setPasswordHash(BaseEncoding.base64().decode("password-hash"))
573+
.setPasswordSalt(BaseEncoding.base64().decode("salt"))
574574
.build());
575575
UserImportOptions options = UserImportOptions.withHash(
576576
Scrypt.builder()

0 commit comments

Comments
 (0)