{"id":22788994,"url":"https://github.com/ripeworks/koa-google-jwt","last_synced_at":"2025-09-10T08:33:50.595Z","repository":{"id":70208198,"uuid":"108866095","full_name":"ripeworks/koa-google-jwt","owner":"ripeworks","description":"JWT-based authentication using Google OAuth for Koa","archived":false,"fork":false,"pushed_at":"2017-10-31T14:07:32.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T16:26:04.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ripeworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-30T14:56:58.000Z","updated_at":"2017-10-31T14:01:01.000Z","dependencies_parsed_at":"2023-03-24T08:46:58.922Z","dependency_job_id":null,"html_url":"https://github.com/ripeworks/koa-google-jwt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ripeworks/koa-google-jwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Fkoa-google-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Fkoa-google-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Fkoa-google-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Fkoa-google-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ripeworks","download_url":"https://codeload.github.com/ripeworks/koa-google-jwt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Fkoa-google-jwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271754354,"owners_count":24815185,"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-08-23T02:00:09.327Z","response_time":69,"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":[],"created_at":"2024-12-12T01:39:34.954Z","updated_at":"2025-08-23T15:20:10.943Z","avatar_url":"https://github.com/ripeworks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koa-google-jwt\nJWT-based authentication using Google OAuth for Koa\n\n## ENV\n\n```\nCLIENT_ID     // google OAuth api id\nCLIENT_SECRET // google OAuth api secret\nCLIENT_URL    // base url to use for callback url\n```\n\n## Usage\n\n```js\nconst koa = require('koa')\nconst googleJwt = require('koa-google-jwt')\n\nconst app = koa()\napp.use(googleJwt({\n  cookie: 'myapp:jwt',\n  secret: 'topsecret',\n  getUser: async (token, loginInfo) =\u003e {\n    return await db.getUser({email: loginInfo.email})\n  },\n  onSuccess: ctx =\u003e ctx.redirect('/'),\n  onFailure: ctx =\u003e ctx.redirect('/')\n}))\n\n// meanwhile...\n\nrouter.get('/protected', ctx =\u003e {\n  ctx.body = `Welcome ${ctx.state.user.name}!`\n})\n\n// API\nctx.state.user\nctx.isAuthenticated()\nctx.logout()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripeworks%2Fkoa-google-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fripeworks%2Fkoa-google-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripeworks%2Fkoa-google-jwt/lists"}