Firebase is a popular suite of tools and services for starting projects quickly in the Google Cloud. Many startups begin there journey with Firebase and as such, have many user accounts still authenticating with Firebase, even after migrating to other tools for the the rest of their stack.
This integration allows you to create new user accounts, and authenticate users with email
and password
.
An example mutation to create a user:
mutation {
firebase_signup(
params: { email: "[email protected]", password: "safe-password" }
) {
idToken
refreshToken
expiresIn
localId
email
}
}
An example mutation to authenticate a user:
mutation {
firebase_signin(
params: { email: "[email protected]", password: "safe-password" }
) {
idToken
refreshToken
expiresIn
localId
email
registered
}
}
You can use the one-click to deploy on Hasura Cloud to get started quickly
You'll need the following environment variables.
FIREBASE_API_BASE: https://identitytoolkit.googleapis.com/v1
Additionally, you'll need your Web API key which you can find from your key settings page available /settings/general
from your main console. You'll provide this as a query parameter. The Environment variable can be added along with the rest of your Hasura GraphQL Engine settings, but the API key will need to be added as a query parameter value for the action itself.
Importing actions and events into Hasura apply one or more actions. Actions based on request configurations and will need metadata to be applied. Events need underlying table structure to trigger the events.
Steps required for this integration:
To apply metadata into your project. You will need:
/hasura
.More information about Hasura CLI can be found in the documentation.
Working on an interesting idea using Hasura?
Submit a new integration