File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
main/java/com/google/firebase/auth Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -374,10 +374,10 @@ class FirebaseAuth constructor(
374
374
setResult = { responseBody ->
375
375
FirebaseUserImpl (app, jsonParser.parseToJsonElement(responseBody).jsonObject)
376
376
},
377
- ).task.continueWith {
377
+ ).task.addOnSuccessListener {
378
378
updateByGetAccountInfo()
379
379
}
380
- return source.result
380
+ return source
381
381
}
382
382
383
383
internal fun updateByGetAccountInfo (): Task <AuthResult > {
Original file line number Diff line number Diff line change @@ -53,6 +53,21 @@ class AuthTest : FirebaseTest() {
53
53
assertEquals(false , auth.currentUser?.isAnonymous)
54
54
}
55
55
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
+
56
71
@Test
57
72
fun `should update displayName and photoUrl` () =
58
73
runTest {
You can’t perform that action at this time.
0 commit comments