Skip to content

Commit 9465f7a

Browse files
committed
refactor
1 parent c811e39 commit 9465f7a

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/main/java/com/google/firebase/auth/FirebaseAuth.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,11 @@ class FirebaseAuth constructor(
425425
setResult = { responseBody ->
426426
FirebaseUserImpl(app, jsonParser.parseToJsonElement(responseBody).jsonObject)
427427
},
428-
).task.continueWith {
428+
).task.addOnSuccessListener {
429429
updateByGetAccountInfo()
430430
>>>>>>> 25efe1c (ktlint formatting + update of user data after signInWithCustomToken + photoUrl and displayName implementation)
431431
}
432-
return source.result
432+
return source
433433
}
434434

435435
internal fun updateByGetAccountInfo(): Task<AuthResult> {

src/test/kotlin/AuthTest.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,21 @@ class AuthTest : FirebaseTest() {
5353
assertEquals(false, auth.currentUser?.isAnonymous)
5454
}
5555

56+
/*@Test
57+
fun `should authenticate via custom token`() =
58+
runTest {
59+
val user = auth.createUserWithEmailAndPassword(email, "test123").await()
60+
auth
61+
.signInWithCustomToken(
62+
user.user
63+
.getIdToken(false)
64+
.await()
65+
.token ?: "",
66+
).await()
67+
68+
assertEquals(false, auth.currentUser?.isAnonymous)
69+
}*/
70+
5671
@Test
5772
fun `should update displayName and photoUrl`() =
5873
runTest {

0 commit comments

Comments
 (0)