{"id":18973347,"url":"https://github.com/cyangle/google-auth","last_synced_at":"2026-01-07T14:48:17.947Z","repository":{"id":119846583,"uuid":"434065512","full_name":"cyangle/google-auth","owner":"cyangle","description":"Google OAuth2 library for crystal","archived":false,"fork":false,"pushed_at":"2022-05-26T05:07:42.000Z","size":6,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T10:12:15.719Z","etag":null,"topics":["crystal","crystal-lang","google-cloud","oauth2-authentication","oauth2-client"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/cyangle.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-12-02T03:13:08.000Z","updated_at":"2022-07-01T01:32:16.000Z","dependencies_parsed_at":"2023-06-03T08:45:13.126Z","dependency_job_id":null,"html_url":"https://github.com/cyangle/google-auth","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyangle%2Fgoogle-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyangle%2Fgoogle-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyangle%2Fgoogle-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyangle%2Fgoogle-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyangle","download_url":"https://codeload.github.com/cyangle/google-auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249223935,"owners_count":21232833,"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":["crystal","crystal-lang","google-cloud","oauth2-authentication","oauth2-client"],"created_at":"2024-11-08T15:11:55.703Z","updated_at":"2026-01-07T14:48:17.898Z","avatar_url":"https://github.com/cyangle.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google-auth\n\nGoogle OAuth2 library for crystal\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     google-auth:\n       github: cyangle/google-auth\n       version: ~\u003e 0.1.1\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"google-auth\"\n```\n\nLoad credential from json file:\n\n```crystal\ncred = GoogleAuth::FileCredential.new(\n  file_path: \"/file/path/to/credential/json/file\",\n  scopes: \"https://www.googleapis.com/auth/cloud-platform\", # String | Array(String)\n  user_agent: \"crystal/client\",\n)\n```\n\nGet access token:\n\n```crystal\ntoken = cred.get_token\n\nputs token.token_type # =\u003e Bearer\nputs token.access_token\n```\n\n## Development\n\nInstall dependencies\n\n```shell\nshards\n```\n\nRun the tests:\n\n```shell\ncrystal spec\n```\n\nRun lints\n\n```shell\n./bin/ameba\ncrystal tool format --check\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/cyangle/google-auth/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Chao Yang](https://github.com/cyangle) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyangle%2Fgoogle-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyangle%2Fgoogle-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyangle%2Fgoogle-auth/lists"}