I'm working on incorporating Firebase Authentication into my Xamarin app. The Firebase docs say that indicate that I can access a new user's UID in a completion method after they complete the CreateUser() method (https://firebase.google.com/docs/auth/ios/start). I have the following code in my IOS project within my Xamarin solution:
Auth.DefaultInstance.CreateUser(email, password, (AuthDataResult authResult, Foundation.NSError error) => {
authResult.User.GetIdToken((string token, Foundation.NSError error1) =>
{
Console.WriteLine("Token Is");
Console.WriteLine(token);
});
});
When the method fires, it says 'authResult' is Null. Specifically, the above method throws the following exception:
System.NullReferenceException has been thrown Object reference not set to an instance of an object.
How can I access the user's UID?
authResult.Userwill benull.