{"id":15284463,"url":"https://github.com/marcosvidolin/google-idtoken-auth","last_synced_at":"2025-10-07T00:32:03.955Z","repository":{"id":51809244,"uuid":"167649325","full_name":"marcosvidolin/google-idtoken-auth","owner":"marcosvidolin","description":"Node.js middleware to validate Google ID tokens in the request.","archived":true,"fork":false,"pushed_at":"2021-05-09T21:27:56.000Z","size":30,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-02T09:34:53.352Z","etag":null,"topics":["auth0","expressjs","google","idtoken","javascript","middleware","nodejs","security","token"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcosvidolin.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-01-26T04:25:10.000Z","updated_at":"2023-01-28T04:20:42.000Z","dependencies_parsed_at":"2022-08-20T02:01:47.125Z","dependency_job_id":null,"html_url":"https://github.com/marcosvidolin/google-idtoken-auth","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/marcosvidolin/google-idtoken-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvidolin%2Fgoogle-idtoken-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvidolin%2Fgoogle-idtoken-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvidolin%2Fgoogle-idtoken-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvidolin%2Fgoogle-idtoken-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcosvidolin","download_url":"https://codeload.github.com/marcosvidolin/google-idtoken-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvidolin%2Fgoogle-idtoken-auth/sbom","scorecard":{"id":618423,"data":{"date":"2025-08-11","repo":{"name":"github.com/marcosvidolin/google-idtoken-auth","commit":"5e73d64db3701141a1dfd73a8e3d06afbd95b400"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"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":"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: MIT License: 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp","Warn: Project is vulnerable to: GHSA-wgfq-7857-4jcc","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj","Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T04:35:25.889Z","repository_id":51809244,"created_at":"2025-08-21T04:35:25.890Z","updated_at":"2025-08-21T04:35:25.890Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278703582,"owners_count":26031204,"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-06T02:00:05.630Z","response_time":65,"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":["auth0","expressjs","google","idtoken","javascript","middleware","nodejs","security","token"],"created_at":"2024-09-30T14:57:06.839Z","updated_at":"2025-10-07T00:32:03.626Z","avatar_url":"https://github.com/marcosvidolin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google-token-auth\n\n[![npm version](https://badge.fury.io/js/google-idtoken-auth.svg)](https://badge.fury.io/js/google-idtoken-auth) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/49992b6c073648c192662bdd7de6f087)](https://www.codacy.com/app/marcosvidolin/google-idtoken-auth?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=marcosvidolin/google-idtoken-auth\u0026amp;utm_campaign=Badge_Grade)\n[![Build Status](https://travis-ci.org/marcosvidolin/google-idtoken-auth.svg?branch=master)](https://travis-ci.org/marcosvidolin/google-idtoken-auth)\n\nNode.js middleware to validate `Google ID Tokens` in the `backend server`.\nValidade the request token, get all the Google ID Token fields and populate the `req.googleProfileInfo`.\n\n## Installation\n\n```sh\n$ npm install google-idtoken-auth\n```\n\n## Options\n\n| Propertie       | Type   | Default          | Required | Description                                        |\n|-----------------|--------|------------------|----------|----------------------------------------------------|\n| clientId        | String |                  | true     | Specify the Google Client ID                       |\n| tokenHeaderName | String | x-googleid-token | false    | Custom header name to retrievi the Google ID Token |\n| gSuiteDomains   | Array  |                  | false    | Specify a G Suite domain                           |\n\n## Example\n\n```js\nvar express = require('express');\nvar googleAuth = require('google-idtoken-auth');\n\nvar googleTokenVerifier = googleAuth.googleIdTokenVerifier({\n    clientId: \"YOUR-GOOGLE-CLIENT-ID\"\n});\n\nvar app = express();\napp.use(googleTokenVerifier);\n\napp.get('/', function (req, res) {\n  // Get the e-mail from google (email OAuth scope)\n  console.log('User e-mail: ', req.googleProfileInfo.email);\n});\n\napp.listen(8080);\n\n// curl command that sends an HTTP request with a valid Google ID Token\n// curl -H \"x-googleid-token: {GOOGLE-ID-TOKEN-HERE}\" http://127.0.0.1:8080\n```\n\n## See more\n\n[Google Sign-In](https://developers.google.com/identity/sign-in/web/sign-in)  \n\n[Authenticate with a backend server](https://developers.google.com/identity/sign-in/web/backend-auth)\n\n## [MIT Licensed](LICENSE)\n\n## Contributors\n[![](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/images/0)](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/links/0)[![](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/images/1)](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/links/1)[![](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/images/2)](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/links/2)[![](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/images/3)](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/links/3)[![](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/images/4)](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/links/4)[![](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/images/5)](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/links/5)[![](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/images/6)](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/links/6)[![](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/images/7)](https://sourcerer.io/fame/marcosvidolin/marcosvidolin/google-idtoken-auth/links/7)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosvidolin%2Fgoogle-idtoken-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcosvidolin%2Fgoogle-idtoken-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosvidolin%2Fgoogle-idtoken-auth/lists"}