I have been using Firebase for authentication of users in the app. FirebaseAuth.getInstance().getCurrentUser().getMetadata()
returns null
when user comes back to the app after the sign up. It works perfectly when user signs up for the first time, but returns null
for returning users.
Malcolm from the Firebase Team here.
Thanks for pointing this out. This is presently a bug in the persistence done by the Android SDK. We'll get on fixing this ASAP - keep an eye on upcoming release notes to know when it's resolved.
In the meantime, the workaround you can use is to write to your app's SharedPreferences to store those attributes at sign up time, and read from those Prefs when you need them elsewhere in your app. Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With