One-line deploy

This step takes about 3 minutes.

What you'll need

  1. Your one-time Doorman API Secret Key (how do I generate a secret key?)

  2. Your Firebase project ID (how can I find my firebase project ID?)

Run the command

In order to deploy, we'll use run-doorman@latest in the root of your app.

Make sure you have your API Secret Key handy.

The command looks like this:

npx run-doorman@latest --firebaseProjectId=FIREBASE-PROJECT-ID --apiSecret=DOORMAN-SECRET-KEY

Tip: If something errors, try running the command a few more times. If that still doesn't fix it, head to our website and live chat with us.

Next, you'll authenticate your Firebase account via Google.

Authenticate Google

After running the command, your browser will open. You should be prompted to log in to Google.

Important: Make sure you sign in to the correct Google account associated with your Firebase project.

If you use multiple computer monitors, the browser may have opened in a different monitor. 👩‍💻

Sign in to Google with account that you used to make to your Firebase project.

Next, select Allow at the bottom.

Monitor your deployment

After authenticating, the deployment will take a few minutes. To monitor when its status, open the project on your Doorman dashboard.

How to generate API Secret

Generating a secret key will render any previously-created keys useless and removing their deployment. You should only generate a secret key once.

  1. Sign in to Doorman.

  2. Open your project. If you don't have one yet, create one.

  3. Go to the Deploy screen.

  4. Scroll down to step 2.

  5. Click "Create Secret Key"

  6. Copy the key.

Find my Firebase project ID

  1. Open your Firebase console and sign in

  2. Copy the Project ID under the name

Behind the scenes

What's happening behind the scenes when you use our CLI?

From the command line, Doorman prompts you to log in to your Firebase account and deploys a cloud function on your behalf. This is all done locally on your machine – Doorman never receives any of your Google credentials.

The cloud function Doorman deploys first validates requests to ensure they're coming from Doorman (using your Doorman secret key). Next, then generates a custom auth token for the user requested by Doorman.