Introducing Cloud Functions

Extend and connect Firebase features to Google's Cloud infrastructure with Cloud Functions. Read More

Move fast

Firebase is a mobile platform that helps you quickly develop high-quality apps, grow your user base, and earn more money. Firebase is made up of complementary features that you can mix-and-match to fit your needs.

Forget about infrastructure

Implementing Firebase is quick and easy. With intuitive APIs packaged into a single SDK, you can focus on solving your customers' problems and not waste time building complex infrastructure.

Make smart, data-driven decisions

Firebase Analytics is the free and unlimited analytics solution built directly into Firebase. Gain insight into your users from ad click to app usage. Firebase Analytics works with other Firebase features, so you can take action on everything from click-through rates to app crashes.
Swift
FIRAuth.auth()?.addAuthStateDidChangeListener({ (auth, user) in
  if (user) {
    var email = user.email
    // ...
  }
})
FIRAuth.auth()?.signInWithEmail(email,
                                password: password,
                                completion: { (_, error) in
  if (error) {
    // ...
  }
})
Objective-C
[[FIRAuth auth] addAuthStateDidChangeListener:^(FIRAuth * _Nonnull auth,
                                                FIRUser * _Nullable user) {
  if (user) {
    NSString *email = user.email;
    // ...
  }
}];
[[FIRAuth auth] signInWithEmail:email
                       password:password
                     completion:^(FIRUser * _Nullable user,
                                  NSError * _Nullable error) {
  if (error) {
    // ...
  }
}];
Java
FirebaseAuth auth = FirebaseAuth.getInstance();
auth.signInWithEmailAndPassword(email, password)
    .addOnCompleteListener(new OnCompleteListener() {
        @Override
        public void onComplete(Task task) {
            if (task.isSuccessful()) {
                FirebaseUser user = task.getResult().getUser();
                String email = user.getEmail();
                // ...
            }
        }
    });
JS
firebase.auth().onAuthStateChanged(function(user) {
    if (user) {
        // User is signed in
        var email = user.email;
        // ...
    } else {
        // User is not signed in
        // ...
    }
});
firebase.auth().signInWithEmailAndPassword(email, password);
C++
firebase::auth::Auth* auth = firebase::auth::Auth::GetAuth(app);
firebase::Future result =
    auth->SignInWithEmailAndPasswordLastResult();
if (result.Status() == firebase::kFutureStatusComplete) {
  if (result.Error() == firebase::auth::kAuthErrorNone) {
    firebase::auth::User* user = *result.Result();
    printf("Sign in succeeded for email %s\n", user->Email().c_str());
    // ...
  }
}
Unity
Firebase.Auth.FirebaseAuth auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
auth.SignInWithEmailAndPasswordAsync(email, password).ContinueWith(task => {
  if (task.IsCanceled) {
    Debug.LogError("SignInWithEmailAndPasswordAsync was canceled.");
    return;
  }
  if (task.IsFaulted) {
    Debug.LogError("SignInWithEmailAndPasswordAsync encountered an error: " + task.Exception);
    return;
  }

  Firebase.Auth.FirebaseUser newUser = task.Result;
  Debug.LogFormat("User signed in successfully: {0} ({1})",
      newUser.DisplayName, newUser.UserId);
});

Work across platforms

Deliver cross-platform apps with APIs packaged into single SDKs for iOS, Android, JavaScript, C++, and Unity. Expand to a different platform without modifying your infrastructure.

Free to start, scale with ease

Most Firebase features are free forever, for any scale. Our four paid features have a generous free tier and two paid plans once you begin to grow.

When your app is a breakout hit, you don't have to worry about scaling your server code or provisioning extra capacity — Firebase handles that for you.

Get free support

We offer free email support to every developer, and the Firebase team and Google Developer Experts are active in online communities like Stack Overflow and GitHub. We're here to help.

Try us out

Start building for free

Оставить отзыв о...

Текущей странице
Нужна помощь? Обратитесь в службу поддержки.