{"id":21655824,"url":"https://github.com/hollowman6/gatekeeper","last_synced_at":"2026-05-20T19:06:19.244Z","repository":{"id":42581803,"uuid":"422549166","full_name":"HollowMan6/GateKeeper","owner":"HollowMan6","description":"Enables client-side applications to dance OAuth with GitHub or GitLab.","archived":false,"fork":false,"pushed_at":"2024-09-24T11:53:51.000Z","size":261,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-25T06:26:09.662Z","etag":null,"topics":["github-api","gitlab-api","oauth2-client"],"latest_commit_sha":null,"homepage":"https://lzu.hollowman.ml/","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/HollowMan6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"HollowMan6","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"custom":"https://hollowman6.github.io/fund.html"}},"created_at":"2021-10-29T11:27:26.000Z","updated_at":"2022-02-06T04:57:35.000Z","dependencies_parsed_at":"2024-11-25T08:46:50.845Z","dependency_job_id":null,"html_url":"https://github.com/HollowMan6/GateKeeper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HollowMan6%2FGateKeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HollowMan6%2FGateKeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HollowMan6%2FGateKeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HollowMan6%2FGateKeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HollowMan6","download_url":"https://codeload.github.com/HollowMan6/GateKeeper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554134,"owners_count":20471173,"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":["github-api","gitlab-api","oauth2-client"],"created_at":"2024-11-25T08:36:13.400Z","updated_at":"2026-05-20T19:06:14.210Z","avatar_url":"https://github.com/HollowMan6.png","language":"JavaScript","funding_links":["https://github.com/sponsors/HollowMan6","https://hollowman6.github.io/fund.html"],"categories":[],"sub_categories":[],"readme":"GateKeeper\n==========\n\nA forked version from [prose/gatekeeper](https://github.com/prose/gatekeeper) with improvements on:\n- URL Redirection.\n- GitHub Apps Subscription Webhook support.\n- [GitLab support](../../tree/GitLab).\n- Send Interactions to Telegram.\n\nBecause of some [security-related limitations](http://blog.vjeux.com/2012/javascript/github-oauth-login-browser-side.html), Github / GitLab prevents you from implementing the OAuth Web Application Flow on a client-side only application.\n\nThis is a real bummer. So we built Gatekeeper, which is the missing piece you need in order to make it work.\n\nGatekeeper works well with [Github.js](http://github.com/michael/github), which helps you access the [Github API](http://developer.github.com/v3/) or GitLab API from the browser. Gatekeeper is free to use under the [MIT license](https://github.com/HollowMan6/GateKeeper/blob/master/LICENSE).\n\n## API\n\n```\nGET http://localhost:9999/authenticate/TEMPORARY_CODE\n```\n\n## OAuth Steps\n\nAlso see the [documentation on Github](http://developer.github.com/v3/oauth/).\n\n1. Redirect users to request GitHub access.\n\n   ```\n   GET https://github.com/login/oauth/authorize\n   ```\n\n2. GitHub redirects back to your site including a temporary code you need for the next step.\n\n   You can grab it like so:\n\n   ```js\n   var code = window.location.href.match(/\\?code=(.*)/)[1];\n   ```\n\n3. Request the actual token using your instance of Gatekeeper, which knows your `client_secret`.\n\n   ```js\n   $.getJSON('http://localhost:9999/authenticate/'+code, function(data) {\n     console.log(data.token);\n   });\n   ```\n\n## Setup your Gatekeeper\n\n1. Clone it\n\n    ```\n    git clone git@github.com:HollowMan6/GateKeeper.git\n    ```\n\n2. Install Dependencies\n\n    ```\n    cd gatekeeper \u0026\u0026 npm install\n    ```\n\n3. Adjust config.json\n\n   ```json\n   {\n     \"oauth_client_id\": \"GITHUB_APPLICATION_CLIENT_ID\",\n     \"oauth_client_secret\": \"GITHUB_APPLICATION_CLIENT_SECRET\",\n     \"oauth_host\": \"github.com\",\n     \"oauth_port\": 443,\n     \"oauth_path\": \"/login/oauth/access_token\",\n     \"oauth_method\": \"POST\",\n     \"port\": 9999\n   }\n   ```\n\n   You can also set environment variables to override the settings if you don't want Git to track your adjusted config.json file. Just use UPPER_CASE keys.\n\n4. Serve it\n\n   ```\n   $ node index.js\n   ```\n\n## Run using Docker\n\nYou can build and run the docker image:\n```bash\ndocker build -t gatekeeper .\ndocker run -p 443:443 -p 9999:9999 --name gatekeeper-server gatekeeper\n```\n\nOr run it with a .env file:\n```bash\ndocker run -p 443:443 -p 9999:9999 --env-file .env --name gatekeeper-server gatekeeper\n```\n\nOr run using the docker hub image:\n```bash\ndocker run -p 443:443 -p 9999:9999 --name gatekeeper-server ludwigschubi/gatekeeper\n```\n\n## Deploy on Heroku\n\n### Heroku Button\n\nUse the button below to instantly setup your own Gatekeeper instance on Heroku.\n\n[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)\n\n### Heroku manually\n\n1. Create a new Heroku app\n\n   ```\n   heroku apps:create APP_NAME\n   ```\n\n3. Provide OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET:\n\n   ```\n   heroku config:set OAUTH_CLIENT_ID=XXXX OAUTH_CLIENT_SECRET=YYYY\n   ```\n\n4. Push changes to heroku\n\n   ```\n   git push heroku master\n   ```\nOR\n\n   ```\n   heroku restart\n   ```\n\n## Deploy on Azure\n\n### Azure Button\n\nUse the button below to instantly setup your own Gatekeeper instance on Azure.\n\n[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/)\n\n### Azure manually\n\n1. Create a new Azure site\n\n   ```\n   azure site create SITE_NAME --git\n   ```\n\n2. Provide OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET:\n\n   ```\n   azure site appsetting add OAUTH_CLIENT_ID=XXXX\n   azure site appsetting add OAUTH_CLIENT_SECRET=YYYY\n   ```\n\n3. Push changes to Azure\n\n   ```\n   git push azure master\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhollowman6%2Fgatekeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhollowman6%2Fgatekeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhollowman6%2Fgatekeeper/lists"}