Docs Menu
Docs Home
/ /
Atlas App Services
/ /

Firebase JWT Authentication (Custom JWT)

On this page

  • Before You Begin
  • Configure the Custom JWT authentication provider
  • Log in with a Firebase JWT

You can configure the Custom JWT authentication provider to authenticate users that you manage with Firebase Authentication.

You will need the following to use Firebase Authentication:

  • A Firebase project with Authentication configured. To learn more, refer to the Firebase Authentication documentation.

  • An App Services App that does not already use Custom JWT authentication. To learn how to create a new App Services App, see Create an App.

  • If you're using the command line interface, you need App Services CLI to be installed and authenticated on your local system.

  • If you're using the Admin API, you need a MongoDB Atlas Admin API public/private key pair. The API key must have Project Owner permissions.

You can configure Custom JWT authentication from the UI or by modifying the underlying configuration files directly with the CLI or Admin API. Choose your preferred method below.

Once you've configured the Custom JWT authentication provider to use Firebase Authentication, you can log in to your App Services App with a Firebase JWT.

  1. Log the user into Firebase. To learn how, see the relevant Firebase SDK documentation for your platform and programming language.

  2. Get the user's Firebase JWT. To learn how, see Retrieve ID tokens on clients in the Firebase documentation.

  3. Use the Firebase JWT to authenticate with Atlas App Services. You can start a session over HTTP or log in with an SDK. To learn how, see the docs for your SDK:

← Custom JWT Authentication