Where do I start with Firebase Authentication?

I already have an authentication system

If your app already has a sign-in implementation and you want to use it to authenticate with Firebase backend services, use Custom Authentication. This includes apps that use any of the following:

  • Custom-built solutions, such as custom password-based systems.
  • Third-party identity management services, such as Auth0 or Okta.
  • Existing integrations with federated identity providers, such as Google, Facebook, or Apple. (And if you don't yet support federated identity, but you want to, see the next section.)

With custom authentication, you sign users in with the system of your choice, create a Firebase token for the user on your backend, and then use the token from the client to authenticate with Firebase.

See the docs for iOS+, Android, Web, Flutter, Unity, or C++.

I want to build my authentication system with Firebase

If you're building a new app or adding sign-in to an existing app, Firebase has libraries and services that can help you implement secure authentication without having to build the authentication backend yourself. Firebase Authentication is a complete backend solution for signing in with passwords, federated identity providers, email links, and text messages.

I want a drop-in solution that's easy to use

The fastest and easiest way to add authentication to an app is to use FirebaseUI Auth, a drop-in UI library. FirebaseUI implements complete user flows for all of Firebase Authentication's supported sign-in methods.

Because FirebaseUI Auth is a drop-in solution, it has a specific UX that might not meet your needs. If you want to change the UX, you can fork the library, which is open source, and use your own version. However, for substantially different sign-in flows, you might prefer to implement your own flows with the Firebase SDK as discussed in the next section.

See the FirebaseUI Auth docs for iOS, Android, or Web.

I want full control over the sign-in experience

For more control over your app's sign-in experience, you can implement your own authentication flows and use the Firebase SDK to work with Firebase's authentication services. For example, build your own email address and password flow or Google Sign-in flow, and pass the user's email address and password or Google ID token to Firebase to authenticate the user.

See the Firebase Authentication SDK docs:

Firebase services
Email address and password sign-in iOS+ | Android | Web | Flutter | Unity | C++
Phone number sign-in iOS+ | Android | Web | Flutter | Unity | C++
Email link sign-in iOS+ | Android | Web | Flutter | Unity | C++
Federated identity
Google iOS+ | Android | Web | Flutter | Unity | C++
Facebook iOS+ | Android | Web | Flutter | Unity | C++
Apple iOS+ | Android | Web | Flutter | Unity | C++
Play Games Android | Unity | C++
Game Center iOS+
GitHub iOS+ | Android | Web | Flutter | Unity | C++
Microsoft iOS+ | Android | Web | Unity | C++
Twitter iOS+ | Android | Web | Flutter | Unity | C++
Yahoo iOS+ | Android | Web | Unity | C++

I want to build rich pre-sign-in experiences

You can enable users to use the signed-in features of your app before they actually sign in using Anonymous Auth. With anonymous "sign-in", you create temporary single-session accounts, which you can use like a real account. Then, after the user signs in or signs up, link the temporary account to the real account to let them continue where they left off.

Anonymous Auth works well alongside either Custom Auth or any of Firebase's authentication services.

See the docs for iOS+, Android, Web, Flutter, Unity, or C++.

I want to access Firebase services from my backend

To access Firebase services from a server, you don't need to use Firebase Authentication. Instead, use the Admin SDK. When you initialize the Admin SDK, you authenticate with service account credentials, which represent your Firebase project rather than a particular user, and which grant full access to your project's resources.