{"id":24143700,"url":"https://github.com/is2ei/passport-typetalk","last_synced_at":"2025-08-18T11:09:59.511Z","repository":{"id":34052695,"uuid":"167683181","full_name":"is2ei/passport-typetalk","owner":"is2ei","description":"Typetalk OAuth2 strategy for Passport ","archived":false,"fork":false,"pushed_at":"2023-01-05T05:00:22.000Z","size":1205,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-09T16:51:43.945Z","etag":null,"topics":["oauth2","passport","typetalk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/is2ei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-26T11:51:54.000Z","updated_at":"2022-10-27T17:13:05.000Z","dependencies_parsed_at":"2023-01-15T04:15:28.634Z","dependency_job_id":null,"html_url":"https://github.com/is2ei/passport-typetalk","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/is2ei/passport-typetalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/is2ei%2Fpassport-typetalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/is2ei%2Fpassport-typetalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/is2ei%2Fpassport-typetalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/is2ei%2Fpassport-typetalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/is2ei","download_url":"https://codeload.github.com/is2ei/passport-typetalk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/is2ei%2Fpassport-typetalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270982194,"owners_count":24679447,"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-18T02:00:08.743Z","response_time":89,"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":["oauth2","passport","typetalk"],"created_at":"2025-01-12T05:28:18.743Z","updated_at":"2025-08-18T11:09:59.482Z","avatar_url":"https://github.com/is2ei.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"passport-typetalk\n===\n\n[![Build Status](https://img.shields.io/travis/is2ei/passport-typetalk/master.svg?style=flat-square)][travis]\n[![Coverage Status](https://img.shields.io/coveralls/github/is2ei/passport-typetalk.svg?style=flat-square)][coveralls]\n[![npm version](https://img.shields.io/npm/v/passport-typetalk.svg?style=flat-square)][npm]\n[![chat on gitter](https://img.shields.io/gitter/room/is2ei/passport-typetalk.svg?style=flat-square)][gitter]\n\n[travis]: https://travis-ci.com/is2ei/passport-typetalk\n[coveralls]: https://coveralls.io/github/is2ei/passport-typetalk?branch=master\n[npm]: https://badge.fury.io/js/passport-typetalk\n[gitter]: https://gitter.im/is2ei/passport-typetalk\n\n[Passport](http://passportjs.org/) strategy for authenticating with [Typetalk](https://www.typetalk.com) using the OAuth 2.0 API.\n\n## Install\n\n```\n$ npm install passport-typetalk\n```\n\n## Usage\n\nExpress example\n\n```javascript\nconst TypetalkStrategy = require(\"passport-typetalk\").Strategy,\n    config = require(\"./config\"),\n    express = require(\"express\"),\n    passport = require(\"passport\");\n\nconst PORT = 3000,\n    app = express();\n\npassport.use(new TypetalkStrategy({\n    \"callbackURL\": \"http://localhost:3000/auth/typetalk/callback\",\n    \"clientID\": config.clientID,\n    \"clientSecret\": config.clientSecret,\n    \"scope\": [\n        \"my\",\n        \"topic.read\"\n    ]\n}, (accessToken, refreshToken, profile, cb) =\u003e cb(null, profile)));\n\npassport.serializeUser((user, cb) =\u003e {\n    cb(null, user);\n});\n\npassport.deserializeUser((obj, cb) =\u003e {\n    cb(null, obj);\n});\n\napp.use(require(\"morgan\")(\"combined\"));\napp.use(require(\"cookie-parser\")());\napp.use(require(\"body-parser\").urlencoded({\"extended\": true}));\napp.use(require(\"express-session\")({\n    \"resave\": true,\n    \"saveUninitialized\": true,\n    \"secret\": \"keyboard cat\"\n}));\n\napp.use(passport.initialize());\napp.use(passport.session());\n\napp.get(\"/\", (req, res) =\u003e {\n    res.send('\u003ca href=\"/auth/typetalk\"\u003eLogin with Typetalk\u003c/a\u003e');\n});\n\napp.get(\"/profile\", (req, res) =\u003e {\n    res.send(`\u003cp\u003eID: ${req.user.id}\u003c/p\u003e\u003cp\u003eName: ${req.user.name}\u003c/p\u003e`);\n});\n\napp.get(\n    \"/auth/typetalk\",\n    passport.authenticate(\"typetalk\")\n);\n\napp.get(\n    \"/auth/typetalk/callback\",\n    passport.authenticate(\"typetalk\", {\"failureRedirect\": \"/\"}),\n    (req, res) =\u003e {\n        res.redirect(\"/profile\");\n    }\n);\n\napp.listen(PORT);\n```\n\nFor working example, see [this repository](https://github.com/is2ei/passport-typetalk-example)\n\n## API Documents\n\n[Here](https://is2ei.github.io/passport-typetalk/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fis2ei%2Fpassport-typetalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fis2ei%2Fpassport-typetalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fis2ei%2Fpassport-typetalk/lists"}