Advertisement
Learning000001

Untitled

Oct 2nd, 2024
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public void LoginAnonymous(Action<bool, string> _callback)
  2. {
  3. auth.SignInAnonymouslyAsync().ContinueWithOnMainThread(_task =>
  4. {
  5. if (_task.IsCanceled)
  6. {
  7. _callback(false, "SignIn was canceled.");
  8. return;
  9. }
  10.  
  11. if (_task.IsFaulted)
  12. {
  13. _callback?.Invoke(false, "SignIn encountered an error: " + _task.Exception);
  14. return;
  15. }
  16.  
  17. firebaseUser = _task.Result.User;
  18. _callback?.Invoke(true, string.Empty);
  19. });
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement