{"id":13801105,"url":"https://github.com/ruel/google-token-erlang","last_synced_at":"2025-10-26T11:31:32.564Z","repository":{"id":57502833,"uuid":"70716331","full_name":"ruel/google-token-erlang","owner":"ruel","description":"Google ID token verifier for Erlang","archived":false,"fork":false,"pushed_at":"2018-05-02T10:26:32.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T18:57:05.420Z","etag":null,"topics":["erlang","google-authentication","google-id-token","google-token","jwt-token","otp"],"latest_commit_sha":null,"homepage":null,"language":"Erlang","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/ruel.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}},"created_at":"2016-10-12T15:56:25.000Z","updated_at":"2024-06-03T02:47:52.000Z","dependencies_parsed_at":"2022-09-02T01:51:54.359Z","dependency_job_id":null,"html_url":"https://github.com/ruel/google-token-erlang","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruel%2Fgoogle-token-erlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruel%2Fgoogle-token-erlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruel%2Fgoogle-token-erlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruel%2Fgoogle-token-erlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruel","download_url":"https://codeload.github.com/ruel/google-token-erlang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238319493,"owners_count":19452343,"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":["erlang","google-authentication","google-id-token","google-token","jwt-token","otp"],"created_at":"2024-08-04T00:01:19.530Z","updated_at":"2025-10-26T11:31:32.224Z","avatar_url":"https://github.com/ruel.png","language":"Erlang","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"# Google ID Token Verifier - Erlang\n\n[![Build Status](https://travis-ci.org/ruel/google-token-erlang.svg?branch=master)](https://travis-ci.org/ruel/google-token-erlang) [![Hex.pm](https://img.shields.io/hexpm/v/google_token.svg)](https://hex.pm/packages/google_token)\n\nAn Erlang application that verifies the integrity of Google ID tokens\nin accordance with [Google's criterias](https://developers.google.com/identity/sign-in/web/backend-auth).\n\nGoogle ID tokens are JWT web tokens passed by clients applications who\nauthenicated to [Google Identity Platform](https://developers.google.com/identity/protocols/OpenIDConnect)\n\n## OTP Version\n\n**Required**: OTP 18 and later\n\n## Setup\n\nThis application can be downloaded as a dependency from [Hex](https://hex.pm/packages/google_token)\n\n```erlang\n{deps, [\n  {google_token, \"1.0.5\"}\n]}. \n```\n\nStart **google_token** in your application's `.app.src` file\n\n```erlang\n{applications, [\n  kernel,\n  stdlib,\n  crypto,\n  ssl,\n  inets,\n  google_token  \n]}.\n```\n\n\u003e **NOTE**: The applications **crypto**, **ssl**, and **inets** must be started\nfirst\n\n## Usage\n\nOnce started, **google_token** can be used by calling either `validate/1` or\n`validate/2`\n\n```erlang\nIdToken = \u003c\u003c\"eyJhbGciOiJSUzI1NiIsImtpZCI6IjcxMjY3OWMzMzVmMWQyZGIxM2FkZTQ0N2NlYjY2NThkM2QwZWExZWIifQ....\"\u003e\u003e,\n{valid, Claims} = google_token:validate(IdToken).\n```\n\nIt's necessary to check the `aud` claim against your own client ID. You can\ndo this manually by yourself, or you can pass a list of IDs as the second\nparameter of `validate/2`\n\n```erlang\nIdToken = \u003c\u003c\"eyJhbGciOiJSUzI1NiIsImtpZCI6IjcxMjY3OWMzMzVmMWQyZGIxM2FkZTQ0N2NlYjY2NThkM2QwZWExZWIifQ....\"\u003e\u003e,\nIds = [\u003c\u003c\"...apps.googleusercontent.com\"\u003e\u003e],\n{valid, Claims} = google_token:validate(IdToken, Ids).\n```\n\nImplementation based on: https://developers.google.com/identity/sign-in/web/backend-auth\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruel%2Fgoogle-token-erlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruel%2Fgoogle-token-erlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruel%2Fgoogle-token-erlang/lists"}