{"id":19360494,"url":"https://github.com/uber5/koa-userinfo","last_synced_at":"2026-05-16T04:12:23.413Z","repository":{"id":32767842,"uuid":"142040113","full_name":"Uber5/koa-userinfo","owner":"Uber5","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-03T15:16:29.000Z","size":1049,"stargazers_count":0,"open_issues_count":11,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T21:47:22.421Z","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/Uber5.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}},"created_at":"2018-07-23T16:25:54.000Z","updated_at":"2020-09-04T11:48:25.000Z","dependencies_parsed_at":"2023-01-14T22:10:11.338Z","dependency_job_id":null,"html_url":"https://github.com/Uber5/koa-userinfo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uber5%2Fkoa-userinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uber5%2Fkoa-userinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uber5%2Fkoa-userinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uber5%2Fkoa-userinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Uber5","download_url":"https://codeload.github.com/Uber5/koa-userinfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240475239,"owners_count":19807292,"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":[],"created_at":"2024-11-10T07:18:18.184Z","updated_at":"2026-05-16T04:12:23.340Z","avatar_url":"https://github.com/Uber5.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What?\n\nThis is [koa](https://github.com/koajs/koa) middleware to retrieve information about an authenticated user (the `userinfo`) given their access token.\n\nSee the [relevant part of the OpenID specification](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo) for details on `userinfo`.\n\n# How to Use\n\nIn a `koa` app, add as middleware:\n\n```\napp.use(userinfo({ site: 'https://login-test.u5auth.com/userinfo' }))\n```\n\nThe middleware fails with a status of 401 if no token is available. This can be ignored by setting the option `allowMissingOrInvalidToken: true`.\n\n# How to Run Sample\n\nCheck the `site` [in the sample](./sample/index.js) and adjust to your userinfo provider (your OAuth2 / OpenID provider). Then:\n\n```\nnpm install\nnpm run sample\n```\n\nThis runs a sample server (on port `PORT` or 3000), which responds with a text representation of your userinfo, if you call it with a valid access token.\n\nExample call:\n\n```\nexport TOKEN=123\ncurl -v -H \"Authorization: Bearer $TOKEN\" localhost:3000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber5%2Fkoa-userinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuber5%2Fkoa-userinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber5%2Fkoa-userinfo/lists"}