Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase user returns null metadata for already signed up users

Tags:

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.

like image 953
Krishna Avatar asked Jan 03 '18 14:01

Krishna


1 Answers

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!

like image 56
Malcolm Deck Avatar answered Sep 21 '22 12:09

Malcolm Deck