{"id":16707848,"url":"https://github.com/syuilo/autwh","last_synced_at":"2025-06-10T22:41:27.001Z","repository":{"id":57187694,"uuid":"79608947","full_name":"syuilo/autwh","owner":"syuilo","description":"Simple Twitter OAuth module for Node.js","archived":false,"fork":false,"pushed_at":"2018-04-09T08:28:17.000Z","size":5,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-02T20:36:28.272Z","etag":null,"topics":["nodejs","oauth","twitter","twitter-api"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/syuilo.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":"2017-01-20T23:18:46.000Z","updated_at":"2019-12-16T12:27:55.000Z","dependencies_parsed_at":"2022-08-28T13:00:31.635Z","dependency_job_id":null,"html_url":"https://github.com/syuilo/autwh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Fautwh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Fautwh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Fautwh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Fautwh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syuilo","download_url":"https://codeload.github.com/syuilo/autwh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239157212,"owners_count":19591283,"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":["nodejs","oauth","twitter","twitter-api"],"created_at":"2024-10-12T19:41:14.112Z","updated_at":"2025-02-16T16:31:38.190Z","avatar_url":"https://github.com/syuilo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"autwh\n-------------------------------\n\n[![][npm-badge]][npm-link]\n[![][mit-badge]][mit]\n\n\u003e A simple Twitter API authentication helper.\n\n[![NPM](https://nodei.co/npm/autwh.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://www.npmjs.com/package/autwh)\n\n## Install\n``` shell\n$ npm install autwh\n```\n\n## Usage\n### With [Express](https://github.com/expressjs/express)\n\nIn this example, express-session is used, but **other methods are also possible.**\n\n``` javascript\nimport autwh from 'autwh';\nimport * as express from 'express';\nimport * as session from 'express-session';\n\nconst twAuth = autwh({\n\tconsumerKey: 'kyoppie',\n\tconsumerSecret: 'yuppie',\n\tcallbackUrl: 'https://my.app.example.com/twitter/callback'\n});\n\nconst app = express();\napp.use(session());\n\napp.get('/twitter/connect', async (req, res) =\u003e {\n\tconst ctx = await twAuth.begin();\n\treq.session.ctx = ctx;\n\tres.redirect(ctx.url);\n});\n\n// URL used in 'callbackUrl' above\napp.get('/twitter/callback', async (req, res) =\u003e {\n\tconst ctx = await twAuth.done(req.session.ctx, req.query.oauth_verifier);\n\tres.send(`Authorized! Hello ${ctx.screenName}.`);\n});\n```\n\n## License\n[MIT](LICENSE)\n\n[npm-link]:  https://www.npmjs.com/package/autwh\n[npm-badge]: https://img.shields.io/npm/v/autwh.svg?style=flat-square\n[mit]:       http://opensource.org/licenses/MIT\n[mit-badge]: https://img.shields.io/badge/license-MIT-444444.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyuilo%2Fautwh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyuilo%2Fautwh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyuilo%2Fautwh/lists"}