The xkit Developer Hub

Welcome to the xkit developer hub. You'll find comprehensive guides and documentation to help you start working with xkit as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Firebase Authentication

Authenticating users with Firebase Authentication

If you use Firebase Authentication to authenticate your users, you can use the same authentication to log users into Xkit to connect other apps to yours.

To set up Firebase Authentication with Xkit, use the following steps:

  1. Click on Settings in the left sidebar and scroll down to "User Tokens"
  2. Click "Add Custom Issuer"
  3. For the "iss Claim", use the value https://securetoken.google.com/<projectId> where <projectId> is your Firebase project ID, the unique identifier for your Firebase project, which can be found in the URL of that project's console.
  4. For the "aud Claim", use the value <projectId> as defined in #3.
  5. For the "User ID Claim", keep it as sub.
  6. Optionally For the "Friendly User Name Claim", use the value email
  7. For the "JSON Web Key Set URL", use the value https://www.googleapis.com/service_accounts/v1/jwk/[email protected]
  8. Click "Save"

Your Xkit installation will now be able to use your Firebase ID tokens to login to Xkit.

An example usage is below:

import firebase from "firebase/app"
import "firebase/auth"
const config = {
  apiKey: <your API key>,
  authDomain: <your domain>,


firebase.auth().onAuthStateChanged(async (user) => {
  if (user) {
    const token = await user.getIdToken()
    await window.xkit.login(token)
  } else {
    await window.xkit.logout()

User Groups

If you want to use the User Groups feature, you'll need to add a custom claim to your Firebase token and add that claim to your issuer settings under Group ID claim.

Further Reading

For more details about this process, check out the Custom Token Issuer Guide on Xkit and the Verify ID Tokens documentation on Firebase.

Updated 5 months ago

Firebase Authentication

Authenticating users with Firebase Authentication

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.