कंसोल पर जाएं

Firebase.Auth.FirebaseAuth

Firebase authentication object.

Summary

Firebase.Auth.FirebaseAuth is the gateway to the Firebase authentication API. With it, you can reference Firebase.Auth.FirebaseAuth objects to manage user accounts and credentials.

Each Firebase.FirebaseApp has up to one Firebase.Auth.FirebaseAuth class. You acquire the Firebase.Auth.FirebaseAuth class through the static function Firebase.Auth.FirebaseAuth.GetAuth.

For example:

// Get the Auth class for your App.
Firebase.Auth.FirebaseAuth auth = Firebase.Auth.FirebaseAuth.GetAuth(app);

// Request anonymous sign-in and wait until asynchronous call completes.
auth.SignInAnonymouslyAsync().ContinueWith((authTask) => {
// Print sign in results.
  if (authTask.IsCanceled) {
    DebugLog("Sign-in canceled.");
  } else if (authTask.IsFaulted) {
    DebugLog("Sign-in encountered an error.");
    DebugLog(authTask.Exception.ToString());
  } else if (authTask.IsCompleted) {
    Firebase.Auth.User user = authTask.Result;
    DebugLog(String.Format("Signed in as {0} user.",
        user.Anonymous ? "an anonymous" : "a non-anonymous"));
    DebugLog("Signing out.");
    auth.SignOut();
});

Inheritance

Inherits from: SystemIDisposable

Properties

App
Get the FirebaseApp associated with this object.
CurrentUser