Hi, how can I be notified when user link his anonymous account successfully with a new one?
addStateDidChangeListener stays silent 馃槄
@adamsmaka The listeners added by addAuthStateDidChangeListener: is by design only triggered when the current user changes. On the other hand, listeners added by addIDTokenDidChangeListener: would have be trigger when the ID token changes, including the linking account case, but our code currently has a bug in this case. I have filed #249 to track it. So at this moment the only thing you can do is to add code directly to the completion block of linkWithCredential:completion: or linkAndRetrieveDataWithCredential:completion:.
Also, just in case you weren't already aware, all listeners are triggered by local events only. Even after #249 is fixed, user linking account on one device won't directly trigger a listener in another app running on the same device, or a listener in any app running on another device.
thank you so much for the answer. appreciate it. we can close the topic.
btw: I <3 Firebase
Most helpful comment
@adamsmaka The listeners added by
addAuthStateDidChangeListener:is by design only triggered when the current user changes. On the other hand, listeners added byaddIDTokenDidChangeListener:would have be trigger when the ID token changes, including the linking account case, but our code currently has a bug in this case. I have filed #249 to track it. So at this moment the only thing you can do is to add code directly to the completion block oflinkWithCredential:completion:orlinkAndRetrieveDataWithCredential:completion:.Also, just in case you weren't already aware, all listeners are triggered by local events only. Even after #249 is fixed, user linking account on one device won't directly trigger a listener in another app running on the same device, or a listener in any app running on another device.