{"id":46095996,"url":"https://github.com/zalgonoise/goauth-cli","last_synced_at":"2026-03-01T18:36:59.973Z","repository":{"id":104245669,"uuid":"370653335","full_name":"zalgonoise/goauth-cli","owner":"zalgonoise","description":"A CLI tool in Golang to generate Access Tokens for your GCP Client IDs and Service Accounts","archived":false,"fork":false,"pushed_at":"2021-05-26T20:55:07.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T12:50:48.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zalgonoise.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-25T10:28:52.000Z","updated_at":"2021-05-26T20:55:10.000Z","dependencies_parsed_at":"2023-08-21T15:31:20.922Z","dependency_job_id":null,"html_url":"https://github.com/zalgonoise/goauth-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zalgonoise/goauth-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalgonoise%2Fgoauth-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalgonoise%2Fgoauth-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalgonoise%2Fgoauth-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalgonoise%2Fgoauth-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zalgonoise","download_url":"https://codeload.github.com/zalgonoise/goauth-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalgonoise%2Fgoauth-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29979126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-03-01T18:36:59.585Z","updated_at":"2026-03-01T18:36:59.760Z","avatar_url":"https://github.com/zalgonoise.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GoAuth (CLI)\n\nGoAuth is a CLI tool written in Golang to generate Access Tokens for your GCP Client IDs and Service Accounts.\n\n## Build Support\n\nGoAuth currently is currently set to be built and tested with `bazel`, however you should be able to build and run simply with `go`.\n\nArchitectural support in `bazel` is defined to support all 4 main architectures:\n- x86\n- x86_64\n- arm\n- arm64\n\n## Runtime\n\nGoAuth supports generating Access Tokens for either Client IDs or Service Accounts. You can check all available flags with `goauth -h`.\n\n\n### Client IDs without Refresh Tokens\n\nTo retrieve an Access Token for a ClientID you must supply the following details:\n- Client ID value\n- Client Secret value\n- Access scopes\n- [optional] Refresh Token\n\nThis can be issued in the following command:\n\n```\ngoauth \\\n    -c \\\n    -i 'client_id' \\\n    -k 'client_secret' \\\n    -x 'access_scopes' \n```\n\nor with `bazel`:\n\n```\nbazel run //:goauth -- \\\n    -c \\\n    -i 'client_id' \\\n    -k 'client_secret' \\\n    -x 'access_scopes' \n```\n\nThis command generates an offline access code retrieval URL. You should copy it and paste it to your browser to grant access to the app, and by doing so retrieving an Access Code which must be returned to the terminal:\n\n```\nPlease visit the following URL and paste the Access code below: \n===\n{URL}\n===\nAccess Code:\n\n```\n\nThe response will return the Access Token and a Refresh Token which can be reused.\n\n### Client IDs with Refresh Tokens\n\nRequests containing Refresh Tokens will not need an access scope specified, provided that the [`-r`] flag is populated with a valid Refresh Token for the referred Client ID:\n\n\n```\ngoauth \\\n    -c \\\n    -i 'client_id' \\\n    -k 'client_secret' \\\n    -r 'refresh_token' \n```\n\nor with `bazel`:\n\n```\nbazel run //:goauth -- \\\n    -c \\\n    -i 'client_id' \\\n    -k 'client_secret' \\\n    -r 'refresh_token' \n```\n\n### Service Accounts\n\nService account authorization is very straightforward where no Refresh Tokens are involved, so no interaction is necessary beyond supplying valid credentials. \n\nThis configuration is currently accepting a JSON keyfile (obtained via GCP) to simplify the way the data is collected for the token to be requested, avoiding pasting your private key in plaintext, in the terminal.\n\nThe Access Token can be retrieved with the following command:\n\n\n```\ngoauth \\\n    -s \\\n    -k 'json_keyfile' \\\n    -x 'access_scopes' \\\n    -u 'impersonated_user'\n```\n\nor with `bazel`:\n\n```\nbazel run //:goauth -- \\\n    -s \\\n    -k 'json_keyfile' \\\n    -x 'access_scopes' \\\n    -u 'impersonated_user'\n```\n\n\n## Extras\n\n#### Ninja-mode (Direct token)\n\nEnabling this flag [`-z`] will spit out __only__ the Access Token (no linefeed included) which may allow the binary to be used (or fed to) other programs - such as a `cURL` HTTP request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalgonoise%2Fgoauth-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzalgonoise%2Fgoauth-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalgonoise%2Fgoauth-cli/lists"}