Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

FirebaseAuth not set to an instance of an object

$
0
0

FirebaseAuth not set to an instance of an object when trying to use FirebaseAuth.Instance.SignInWithEmailAndPasswordAsync(email, password)

I stopped getting the error after downgrading Firebase Core and Firebase Auth to 60.1142.1 but sign in still doesnt work. Here's my code:

public async Task<string> LoginWithEmailPassword(string email, string password) { try { var user = await FirebaseAuth.Instance.SignInWithEmailAndPasswordAsync(email, password); var token = await user.User.GetIdTokenAsync(false); return token.Token; } catch (FirebaseAuthInvalidUserException e) { e.PrintStackTrace(); return ""; } }

When I use a breakpoint, it stops after executing var user = await FirebaseAuth.Instance.SignInWithEmailAndPasswordAsync(email, password); and doesn't do anything.

EDIT: Works on physical device, error on emulator


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>