{"id":19944059,"url":"https://github.com/benderthecrime/passport-rapid-api-auth","last_synced_at":"2025-06-21T17:06:48.000Z","repository":{"id":35474147,"uuid":"217887498","full_name":"benderTheCrime/passport-rapid-api-auth","owner":"benderTheCrime","description":"Provides an additional layer of security for RapidAPI APIs built on Node.js.","archived":false,"fork":false,"pushed_at":"2022-12-30T18:57:14.000Z","size":4330,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T17:06:42.071Z","etag":null,"topics":["authentication","passport","rapidapi","security"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benderTheCrime.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"benderTheCrime"}},"created_at":"2019-10-27T17:01:09.000Z","updated_at":"2023-03-07T03:27:15.000Z","dependencies_parsed_at":"2023-01-15T21:49:05.990Z","dependency_job_id":null,"html_url":"https://github.com/benderTheCrime/passport-rapid-api-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benderTheCrime/passport-rapid-api-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benderTheCrime%2Fpassport-rapid-api-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benderTheCrime%2Fpassport-rapid-api-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benderTheCrime%2Fpassport-rapid-api-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benderTheCrime%2Fpassport-rapid-api-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benderTheCrime","download_url":"https://codeload.github.com/benderTheCrime/passport-rapid-api-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benderTheCrime%2Fpassport-rapid-api-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261162067,"owners_count":23118221,"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","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":["authentication","passport","rapidapi","security"],"created_at":"2024-11-13T00:18:55.275Z","updated_at":"2025-06-21T17:06:42.975Z","avatar_url":"https://github.com/benderTheCrime.png","language":"JavaScript","funding_links":["https://github.com/sponsors/benderTheCrime"],"categories":[],"sub_categories":[],"readme":"# passport-rapid-api-auth\n\n\n\nProvides an additional layer of security for RapidAPI APIs built on Node.js.\n\n## Installation\n\n```sh\nnpm i passport-rapid-api-auth\n```\n\n## Usage\n\n```js\nconst passport = require('passport')\nconst {Strategy: RapidAPIPassportStrategy} = require('passport-rapid-api-auth')\n\nconst authParams = {\n  passReqToCallback: false,\n  proxySecret: 'RAPID_API_PROXY_SECRET',\n}\n\npassport.use('rapid-api', new Strategy(authParams, verify)\n\napp.use(passport.initialize())\napp.use(passport.session())\n\nfunction verify(...args) {\n  const [user, id, next] = args\n\n  return next(null, {\n    id,\n    name: user.name,\n    subscription: user.subscription,\n    version: user.version,\n  })\n}\n```\n\n### RapidAPI Proxy Secret\n\n\u003e For security, you should protect your API by blocking requests that are not from the RapidAPI infrastructure. RapidAPI adds the \"X-RapidAPI-Proxy-Secret\" header on every request. This header has a unique value for each API. if this header is missing or has a different value from the value specified below, you should assume the request is not from RapidAPI infrastructure.\n\nThis value can be found under the \"Settings\" tab in your RapidAPI configuration.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenderthecrime%2Fpassport-rapid-api-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenderthecrime%2Fpassport-rapid-api-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenderthecrime%2Fpassport-rapid-api-auth/lists"}