Setup Firebase Realtime SDK Project
Updated 939 Days AgoPublic

  • Obtain Google account
  • Open Firebase console:
  • Log in with Google credentials.
  • "Create new project" - I would recommend to apply some naming convention and use postfix "-dev", "-qa" and "-prod" respectively.
  • Open permissions ("Settings" gear "Overview" menu item)
  • "Service Accounts"
  • "Create Service Account"
    • Provide name, select role "Project > Editor"
    • Check "Furnish a new private key"

  • Store JSON document in a secure place. *Do not put on app's web dir or any publicly accessible place!* For yaas-tools, this `yaas-sso` module requires the credentials to issue OpenID tokens (blog post will follow).
  • Go back to console main screen, open "Database" view and note database URL (in our case: `` )
  • Go to "Settings > Project Settings" and note Web API Key.
  • Update DB URL and Web API Key,
On YAAS-SSO authentication and DB settings are unified in a `yaas-sso-<env>.json` like this:
  "type": "service_account",
  "project_id": "yaas-scul***",
  "private_key_id": "2928c0***",
  "private_key": "-----BEGIN PRIVATE KEY-----***\n",
  "client_email": "yaas-sso@***",
  "client_id": "112***",
  "auth_uri": "",
  "token_uri": "",
  "auth_provider_x509_cert_url": "",
  "client_x509_cert_url": "***",

  "databaseURL": "https://yaas-sc***"
  • Install, if not already done, firebase cli
  • On prompt, login: firebase login. Webbrowser access required to log you into your account!
  • firebase use <<YourProjectName>>
  • firebase deploy - this will upload database security rules as defined in databases.rules.json (referenced from `firebase.json`)
Tryout via node sso.js --env=dev and requesting a token exchange via CURL shows the expected result.

*to be continued w/ OAuth2 setup*

Last Author