I think it's not a FireBase issue : When I change user name or Photo in Google profile, the new values are not updated automatically in app.
I think we should use the reload method (or updateProfile). but I don't know how.
perhaps it requires an evolution of the FirebaseAuth library.
Sub Activity_Click
Dim jo As JavaObject = Starter.auth.CurrentUser
Dim task As JavaObject = jo.RunMethod("reload", Null)
Do While task.RunMethod("isComplete", Null) = False
Sleep(100)
Loop
Log("Reloaded")
End Sub
There is a difference between Firebase and Google data.
Once initialized, the Firebase user-account is no longer updated.
B4X:
Dim jo As JavaObject = Starter.auth.CurrentUser
Dim providerData As List = jo.RunMethod("getProviderData", Null)
'UserInfo
For Each item In providerData
Dim jo2 As JavaObject = item
Log("providerId : " & jo2.RunMethod("getProviderId", Null))
Log("photoUrl : " & jo2.RunMethod("getPhotoUrl", Null))
Next
1 - I sign with user "ze.apptest02@gmail.com".
Name displayed : Pierre Apptest
2 - I sign out
3 - On Google profile, i change photo and given name
4 - After about an hour, I sign with the same user
Tonight urlPhoto is up to date (on Firebase user's profile, like on google profile).
Look no further, a developer colleague explained to me: There are some bugs on Firebase (Erel is right! post #5)
1 - if the original profile photo url returns a 404. Firebase doesn't seem to update user profile (bug). Otherwise Firebase takes 12 or 24 hours to update its data.
2 - the "DisplayName" is never updated (bug?).