{"id":21231377,"url":"https://github.com/romainvialard/firebaseapp","last_synced_at":"2025-10-09T21:02:47.229Z","repository":{"id":45717760,"uuid":"89213679","full_name":"RomainVialard/FirebaseApp","owner":"RomainVialard","description":"Google Apps Script binding for Firebase Realtime Database","archived":false,"fork":false,"pushed_at":"2021-02-01T11:26:01.000Z","size":106,"stargazers_count":120,"open_issues_count":6,"forks_count":30,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-07T02:35:11.613Z","etag":null,"topics":["apps-script","firebase","firebase-realtime-database","google-apps-script"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RomainVialard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-24T08:08:33.000Z","updated_at":"2025-05-08T15:24:15.000Z","dependencies_parsed_at":"2022-09-26T17:41:41.078Z","dependency_job_id":null,"html_url":"https://github.com/RomainVialard/FirebaseApp","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/RomainVialard/FirebaseApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomainVialard%2FFirebaseApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomainVialard%2FFirebaseApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomainVialard%2FFirebaseApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomainVialard%2FFirebaseApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RomainVialard","download_url":"https://codeload.github.com/RomainVialard/FirebaseApp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomainVialard%2FFirebaseApp/sbom","scorecard":{"id":122477,"data":{"date":"2025-08-11","repo":{"name":"github.com/RomainVialard/FirebaseApp","commit":"1d950d5fe8359b988d6c62d7070cd867cf833fe3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 5/22 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T02:47:37.610Z","repository_id":45717760,"created_at":"2025-08-16T02:47:37.610Z","updated_at":"2025-08-16T02:47:37.610Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001952,"owners_count":26083265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apps-script","firebase","firebase-realtime-database","google-apps-script"],"created_at":"2024-11-20T23:46:39.091Z","updated_at":"2025-10-09T21:02:47.214Z","avatar_url":"https://github.com/RomainVialard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# FirebaseApp\nThe Google Apps Script binding for the Firebase Realtime Database\n\n# Install\nBest it to copy the content of this file in your Google Apps Script project:\nhttps://github.com/RomainVialard/FirebaseApp/blob/master/src/Code.gs\n\nYou can also add it as a library, though this is not recommended.  \nhttps://developers.google.com/apps-script/guides/libraries  \nLibrary's script ID: **1VlYLzhwx0YEoxIe62eItLAZeobVt_l-GQUKt2MXXuBHFVsqBkl9C_yBB**\n\n\n# Documentation / Reference\n\n## Class FirebaseApp\n\n## `getDatabaseByUrl(url, optSecret)`\n\nRetrieves a database by url\n\n * **Parameters:**\n   * `url` — `string` — - the database url\n   * `[optSecret]` — `string` — - a Firebase app secret\n\n     \u003cp\u003e\n * **Returns:** `Database` — the Database found at the given URL\n\n\n## `encodeAsFirebaseKey(string)`\n\nReturns a valid Firebase key from a given string Firebase Keys can't contain any of the following characters: . $ # [ ] / https://firebase.google.com/docs/database/usage/limits#data_tree https://groups.google.com/forum/#!msg/firebase-talk/vtX8lfxxShk/skzA5vQFdosJ\n\n * **Parameters:** `string` — `string` — - the string to encode\n\n     \u003cp\u003e\n * **Returns:** `string` — the encoded string\n\n## `decodeFirebaseKey(string)`\n\nReturns a decoded string from a Firebase key encoded by encodeAsFirebaseKey()\n\n * **Parameters:** `string` — `string` — - the encoded Firebase key\n\n     \u003cp\u003e\n * **Returns:** `string` — the decoded string\n\n## `signInWithIdp(firebaseConfig, idToken)`\n\nSigns in or signs up a user using credentials from an Identity Provider (IdP) - eg: google.com. https://cloud.google.com/identity-platform/docs/reference/rest/v1/accounts/signInWithIdp\n\n * **Parameters:**\n   * `firebaseConfig` — `object` — - see the \"Get config object for your web app\" section in the page linked below.\n\n     https://support.google.com/firebase/answer/7015592?hl=en\n   * `idToken` — `string` — - an OpenID Connect identity token retrieved via ScriptApp.getIdentityToken()\n * **Returns:** `object` — the auth token granting access to firebase\n\n## Class Database\n## `createAuthToken(userEmail, optAuthData, serviceAccountEmail, privateKey)`\n\nGenerates an authorization token to firebase\n\n * **Parameters:**\n   * `userEmail` — `string` — the email account of the user you want to authenticate\n   * `optAuthData` — `object` — key-pairs of data to be associated to this user.\n   * `serviceAccountEmail` — `string` — the email of the service account used to generate this token\n   * `privateKey` — `string` — the private key of this service account\n * **Returns:** `object` — the auth token granting access to firebase\n\n## `createAuthTokenFromServiceAccount(userEmail, optCustomClaims)`\n\nGenerates an authorization token to Firebase\n\n * **Parameters:**\n   * `userEmail` — `string` — - the email account of the user you want to authenticate\n   * `optCustomClaims` — `object` — - key-pairs of data to be associated to this user (aka custom claims).\n\n     \u003cp\u003e\n * **Returns:** `object` — the auth token granting access to firebase\n\n## `createLegacyAuthToken(userEmail, optCustomClaims)`\n\nGenerates an authorization token to firebase\n\n * **Parameters:**\n   * `userEmail` — `string` — the email account of the user you want to authenticate\n   * `optCustomClaims` — `object` — - key-pairs of data to be associated to this user (aka custom claims).\n * **Returns:** `object` — the auth token granting access to firebase\n\n## `getData(path, optQueryParameters)`\n\nReturns the data at this path\n\n * **Parameters:**\n   * `path` — `string` — - the path where the data is stored\n   * `[optQueryParameters]` — `OptQueryParameters` — - a set of query parameters\n\n     \u003cp\u003e\n * **Returns:** `object` — the data found at the given path\n\n## `getAllData(requests)`\n\nReturns data in all specified paths\n\n * **Parameters:** `{Array.\u003cstring` — FirebaseApp_.request\u003e} requests - array of requests\n\n     \u003cp\u003e\n * **Returns:** `object` — responses to each requests\n\n## `pushData(path, data, optQueryParameters)`\n\nGenerates a new child location using a unique key\n\n * **Parameters:**\n   * `path` — `string` — - the path where to create a new child\n   * `data` — `object` — - the data to be written at the generated location\n   * `[optQueryParameters]` — `OptQueryParameters` — - a set of query parameters\n\n     \u003cp\u003e\n * **Returns:** `string` — the child name of the new data that was added\n\n## `setData(path, data, optQueryParameters)`\n\nWrite data at the specified path\n\n * **Parameters:**\n   * `path` — `string` — - the path where to write data\n   * `data` — `object` — - the data to be written at the specified path\n   * `[optQueryParameters]` — `OptQueryParameters` — - a set of query parameters\n\n     \u003cp\u003e\n * **Returns:** `object` — the data written\n\n## `updateData(path, data, optQueryParameters)`\n\nUpdate specific children at the specified path without overwriting existing data\n\n * **Parameters:**\n   * `path` — `string` — - the path where to update data\n   * `data` — `object` — - the children to overwrite\n   * `[optQueryParameters]` — `OptQueryParameters` — a - set of query parameters\n\n     \u003cp\u003e\n * **Returns:** `object` — the data written\n\n## `removeData(path, optQueryParameters)`\n\nDelete data at the specified path\n\n * **Parameters:**\n   * `path` — `string` — - the path where to delete data\n   * `[optQueryParameters]` — `OptQueryParameters` — - a set of query parameters\n\n     \u003cp\u003e\n * **Returns:** `null` — \n\n## `getUrlFromPath(path)`\n\nGets the absolute URL from the specified path\n\n * **Parameters:** `path` — `string` — - the path / location to convert to URL\n * **Returns:** `string` — an encoded URL that is ready to be put into a browser\n\n#Tutorials\nhttps://sites.google.com/site/scriptsexamples/new-connectors-to-google-services/firebase/tutorials\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromainvialard%2Ffirebaseapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromainvialard%2Ffirebaseapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromainvialard%2Ffirebaseapp/lists"}