{"id":17723763,"url":"https://github.com/ncw/oauthproxy","last_synced_at":"2025-10-08T19:26:57.695Z","repository":{"id":140294296,"uuid":"93785487","full_name":"ncw/oauthproxy","owner":"ncw","description":"This is an oauth2 proxy server","archived":false,"fork":false,"pushed_at":"2017-06-10T11:14:03.000Z","size":10,"stargazers_count":35,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-04T03:42:22.122Z","etag":null,"topics":["oauth","oauth2","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ncw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2017-06-08T19:40:32.000Z","updated_at":"2024-04-25T19:58:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"7fe9520c-a66f-4f03-9ab7-3e1234feb9e5","html_url":"https://github.com/ncw/oauthproxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ncw/oauthproxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncw%2Foauthproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncw%2Foauthproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncw%2Foauthproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncw%2Foauthproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncw","download_url":"https://codeload.github.com/ncw/oauthproxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncw%2Foauthproxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000706,"owners_count":26082805,"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-08T02:00:06.501Z","response_time":56,"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":["oauth","oauth2","proxy"],"created_at":"2024-10-25T15:43:59.483Z","updated_at":"2025-10-08T19:26:57.678Z","avatar_url":"https://github.com/ncw.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oauth2 proxy #\n\nThis is an oauth2 proxy designed to run on Google Appengine. Its\npurpose is to allow users to connect to an oauth service while hiding\nthe client ID and client secret for the service from the users.\n\nIt works by receiving connections and proxying them onwards.  It\nchanges any client ID and client secrets as it passes through into the\nsecret version.\n\nAuthentication to this proxy is done with a different client ID and\nclient secret.  These must be correct for the proxy to use the secret\ncredentials.\n\nIt doesn't store any data or credentials as they pass through the\nproxy.\n\nIt is designed to be compatible with any oauth2 application.\n\n## Installation ##\n\nFollow the [go appengine quickstart \"before you begin\" section](https://cloud.google.com/appengine/docs/standard/go/quickstart#before-you-begin).\n\nYou should now have a working `gcloud` tool at this point and a project\ncreated with appengine before continuing.\n\nInstall the [go language](https://golang.org/doc/install).  Make sure\ngo is on your PATH by running `go version`.\n\nSet GOPATH - this should be a specific one for this project.\n\n    export GOPATH=/tmp/go-appengine\n\nInstall the appengine support libraries\n\n    go get google.golang.org/appengine\n\nCheck out the code wherever you like\n\n    git clone https://github.com/ncw/oauthproxy.git\n    cd oauthproxy\n\n## Configuration ##\n\nYou need to create a file like this called `oauthproxy-config.json`\n(you can find this example in\n[oauthproxy-config.json](/oauthproxy-config.json.example))\n\n```json\n{\n    \"AuthURL\" : \"https://www.amazon.com/ap/oa\",\n    \"TokenURL\" : \"https://api.amazon.com/auth/o2/token\",\n    \"ClientID\" : \"Your Client ID goes here\",\n    \"ClientSecret\" : \"Your Client secret goes here\",\n    \"IncomingClientID\" : \"Client ID (username) your users should use\",\n    \"IncomingClientSecret\" : \"Client Secret (password) your users should use\",\n    \"Name\" : \"oauth2 proxy\"\n}\n```\n\nNote that `ClientID` and `ClientSecret` should be the ones for the\nservice you are trying to use at `AuthURL` and `TokenURL`.\n\nWhereas `IncomingClientID` and `IncomingClientSecret` should be made\nup by you to be as secure or not as you like.  These are used for\nauthentication to this service in place of a username and password.\n\n## Testing ##\n\nNow try running the development version of this code.\n\n    dev_appserver.py app.yaml\n\nCheck this starts up, and you can visit the test app at\nhttp://localhost:8080/.  This should show a simple page with the\ncurrent time on.\n\n## Deploy ##\n\nYou are ready to deploy the app to Appengine now.\n\n    gcloud app deploy\n\nNow visit the app to check it is working\n\n    gcloud app browse\n\nIt will take you to the index page of the app.  Make a note of the URL\nit will be something like `https://YOURPROJECT.appspot.com`.\n\n## rclone configuration ##\n\nFirst make sure your oauth credentials allow the redirect URL of\n`http://127.0.0.1:53682/` as this is what rclone uses.  If you don't\nset this then the authorization process will fail mysteriously.\n\nNow you need to configure rclone to use the new oauth proxy. You'll\nneed an up to date rclone 1.37 or an up to date beta of 1.36 to use\nthe oauth proxy.\n\nCreate a new remote with `rclone config`. When filling out the details\nin the configurator note that:\n\n  * `client_id` takes the value of `IncomingClientID`\n  * `client_secret` takes the value of `IncomingClientSecret`\n  * `auth_url` is the same as your appspot URL but with `/auth` on the end.\n  * `token_url` is the same as your appspot URL but with `/token` on the end.\n\n```\nNo remotes found - make a new one\nn) New remote\ns) Set configuration password\nq) Quit config\nn/s/q\u003e n\nname\u003e acd\nType of storage to configure.\nChoose a number from below, or type in your own value\n 1 / Amazon Drive\n   \\ \"amazon cloud drive\"\n 2 / Amazon S3 (also Dreamhost, Ceph, Minio)\n   \\ \"s3\"\n 3 / Backblaze B2\n   \\ \"b2\"\n 4 / Dropbox\n   \\ \"dropbox\"\n 5 / Encrypt/Decrypt a remote\n   \\ \"crypt\"\n 6 / FTP Connection\n   \\ \"ftp\"\n 7 / Google Cloud Storage (this is not Google Drive)\n   \\ \"google cloud storage\"\n 8 / Google Drive\n   \\ \"drive\"\n 9 / Hubic\n   \\ \"hubic\"\n10 / Local Disk\n   \\ \"local\"\n11 / Microsoft OneDrive\n   \\ \"onedrive\"\n12 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)\n   \\ \"swift\"\n13 / SSH/SFTP Connection\n   \\ \"sftp\"\n14 / Yandex Disk\n   \\ \"yandex\"\nStorage\u003e 1\nAmazon Application Client Id - required.\nclient_id\u003e IncomingClientID\nAmazon Application Client Secret - required.\nclient_secret\u003e IncomingClientSecret\nAuth server URL - leave blank to use Amazon's.\nauth_url\u003e https://YOURPROJECT.appspot.com/auth\nToken server url - leave blank to use Amazon's.\ntoken_url\u003e https://YOURPROJECT.appspot.com/token\nRemote config\nMake sure your Redirect URL is set to \"http://127.0.0.1:53682/\" in your custom config.\nUse auto config?\n * Say Y if not sure\n * Say N if you are working on a remote or headless machine\ny) Yes\nn) No\ny/n\u003e y\nIf your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth\nLog in and authorize rclone for access\nWaiting for code...\nGot code\n--------------------\n[acd]\ntype = amazon cloud drive\nclient_id = IncomingClientID\nclient_secret = IncomingClientSecret\nauth_url = https://YOURPROJECT.appspot.com/auth\ntoken_url = https://YOURPROJECT.appspot.com/token\ntoken = XXXX\n--------------------\ny) Yes this is OK\ne) Edit this remote\nd) Delete this remote\ny/e/d\u003e y\n```\n\nrclone should be ready to use - test with `rclone lsd acd:`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncw%2Foauthproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncw%2Foauthproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncw%2Foauthproxy/lists"}