Skip to main content

Authenticate using Firebase Auth

Setting up Firebase Authentication in Superblocks should take no longer than 5 minutes.

1. Add as an authorized domain in Firebase:

Provide as an authorized domain

2. Create a new web application in Firebase:

Create a new Firebase web application named superblocks-demo

Configure nickname for app

3. Copy the config object that Firebase provides (Note: be sure to not include the semicolon at the end of the line!)

Copy sdk config firebaseConfig

4. Now let's move to Superblocks and create a new REST API integration. A REST API integration allows you to create a template for a REST API call that can be re-used across Superblocks APIs. Note that if your REST API is authenticated with Firebase, you cannot use it in Workflows and Scheduled jobs as they can be called headlessly (without user interaction). Choose Firebase as your authentication method:

Select Firebase from Authentication dropdown

5. Paste your API configuration and choose your authentication providers (e.g. Google, email/password)

Paste API config

6. Finally, you can reference {{firebase.token}} anywhere in your Headers or Params to refer to the authentication token returned by Firebase. You can also refer to the currently authenticated user by {{firebase.userId}}. Here is an example:

Use firebase.token below to refer to the firebase authentication token and use firebase.userId to refer to the currently authenticated user's ID

You are free to use these bindings outside of this page when running REST API steps from APIs as well! Save this integration and it can be used in any application in Superblocks.

Congratulations! You have now setup Firebase Auth with Superblocks!