{"id":20482178,"url":"https://github.com/leaonline/ddp-login-handler","last_synced_at":"2026-04-21T19:03:21.207Z","repository":{"id":46283080,"uuid":"215084608","full_name":"leaonline/ddp-login-handler","owner":"leaonline","description":"Authenticate a remote DDP connect using an accessToken and an OAuth service","archived":false,"fork":false,"pushed_at":"2026-02-06T12:48:32.000Z","size":32,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-06T20:37:49.507Z","etag":null,"topics":["connection","ddp","meteor","microservices","oauth2"],"latest_commit_sha":null,"homepage":null,"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/leaonline.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-14T15:52:02.000Z","updated_at":"2026-02-06T12:48:36.000Z","dependencies_parsed_at":"2025-01-16T04:14:02.382Z","dependency_job_id":"d3665da6-ef35-4f34-9b97-e592f33b4e42","html_url":"https://github.com/leaonline/ddp-login-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leaonline/ddp-login-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaonline%2Fddp-login-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaonline%2Fddp-login-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaonline%2Fddp-login-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaonline%2Fddp-login-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leaonline","download_url":"https://codeload.github.com/leaonline/ddp-login-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaonline%2Fddp-login-handler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32105868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["connection","ddp","meteor","microservices","oauth2"],"created_at":"2024-11-15T16:11:55.587Z","updated_at":"2026-04-21T19:03:21.201Z","avatar_url":"https://github.com/leaonline.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meteor DDP Login Handler\n\n[![Test suite](https://github.com/leaonline/ddp-login-handler/actions/workflows/tests.yml/badge.svg)](https://github.com/leaonline/ddp-login-handler/actions/workflows/tests.yml)\n[![CodeQL](https://github.com/leaonline/ddp-login-handler/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/leaonline/ddp-login-handler/actions/workflows/codeql-analysis.yml)\n[![built with Meteor](https://img.shields.io/badge/Meteor-package-green?logo=meteor\u0026logoColor=white)](https://meteor.com)\n![GitHub](https://img.shields.io/github/license/leaonline/ddp-login-handler)\n\nAuthenticate a remote DDP connect using an accessToken and a custom OAuth2 \nservice.\n\nThis allows to make calls via DDP connection in behalf of a user, that is\nregistered on a remote Accounts server.\n\n## Usage\n\nThe handler needs to make a call to your OAuth2 server's identity URL (the one\nthat is used to retrieve user credentials **after** the workflow has completed\nsuccessfully).\n\nIf the OAuth2 server responds with data (ususally an `id` and `login` or \n`username` field) it will add the user to the users collection and also sets the\nDDP session's user to it.\n\n**Example setup:** \n\n```js\n/* global ServiceConfiguration */\nimport { Meteor } from 'meteor/meteor'\nimport { Accounts } from 'meteor/accounts-base'\nimport { HTTP } from 'meteor/http'\nimport {\n  defaultDDPLoginName,\n  getOAuthDDPLoginHandler\n} from 'meteor/leaonline:ddp-login-handler'\n\nMeteor.startup(() =\u003e {\n  setupOAuth()\n})\n\nfunction setupOAuth () {\n  const { oauth } = Meteor.settings\n  \n  ServiceConfiguration.configurations.upsert(\n    { service: 'lea' },\n    {\n      $set: {\n        loginStyle: 'popup',\n        clientId: oauth.clientId,\n        secret: oauth.secret,\n        dialogUrl: oauth.dialogUrl,\n        accessTokenUrl: oauth.accessTokenUrl,\n        identityUrl: oauth.identityUrl,\n        redirectUrl: oauth.redirectUrl\n      }\n    }\n  )\n\n  const loginHandler = getOAuthDDPLoginHandler({\n    identityUrl: oauth.identityUrl,\n    httpGet: (url, requestOptions) =\u003e HTTP.get(url, requestOptions),\n    debug: console.debug\n  })\n\n  Accounts.registerLoginHandler(defaultDDPLoginName, loginHandler)\n}\n```\n\n## Development, running tests\n\nTo run the tests you can use the following line on your terminal:\n\n```bash\nTEST_WATCH=1 TEST_CLIENT=0 meteor test-packages ./ --driver-package meteortesting:mocha\n```\n\n## LICENSE\n\nMIT, see [LICENSE](./LICENSE) file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaonline%2Fddp-login-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleaonline%2Fddp-login-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaonline%2Fddp-login-handler/lists"}