Your one-time Doorman API Secret Key (how do I generate a secret key?)
Your Firebase project ID (how can I find my firebase project ID?)
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
Next, you'll authenticate your Firebase account via Google.
After running the command, your browser will open. You should be prompted to log in to Google.
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.
After authenticating, the deployment will take a few minutes. To monitor when its status, open the project on your Doorman dashboard.
Generating a secret key will render any previously-created keys useless and removing their deployment. You should only generate a secret key once.
Sign in to Doorman.
Open your project. If you don't have one yet, create one.
Go to the Deploy screen.
Scroll down to step 2.
Click "Create Secret Key"
Copy the key.
Open your Firebase console and sign in
Copy the Project ID under the name
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.