{"id":30180958,"url":"https://github.com/streamich/client-passport","last_synced_at":"2025-08-12T08:06:34.886Z","repository":{"id":57200294,"uuid":"159034365","full_name":"streamich/client-passport","owner":"streamich","description":"Authentication for single-page apps","archived":false,"fork":false,"pushed_at":"2023-12-15T05:09:31.000Z","size":319,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T03:23:23.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamich.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2018-11-25T13:27:56.000Z","updated_at":"2023-03-09T11:35:13.000Z","dependencies_parsed_at":"2024-02-05T10:15:27.193Z","dependency_job_id":null,"html_url":"https://github.com/streamich/client-passport","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/streamich/client-passport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fclient-passport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fclient-passport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fclient-passport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fclient-passport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamich","download_url":"https://codeload.github.com/streamich/client-passport/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fclient-passport/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269688006,"owners_count":24459396,"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-10T02:00:08.965Z","response_time":71,"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":"2025-08-12T08:06:16.258Z","updated_at":"2025-08-12T08:06:34.873Z","avatar_url":"https://github.com/streamich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# client-passport\n\nUniversal authentication for client-side apps, supported providers:\n\n- [x] Google Sign-in for Websites\n- [x] Facebook SDK\n\n\n## Usage\n\nCreate `authenticator` instance.\n\n```js\nimport {passport} from 'client-passport';\nimport {loader as facebookLoader} from 'client-passport/lib/providers/facebook';\n\nconst authenticator = passport({\n  providers: {\n    google: async () =\u003e ({\n      loader: (await import('client-passport/lib/providers/google')).loader,\n      options: {\n        client_id: 'xxxxxxxxxx-yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.apps.googleusercontent.com',\n      },\n    }),\n    facebook: () =\u003e ({\n      loader: facebookLoader,\n      options: {\n        appId: '00000000000000',\n        autoLogAppEvents: true,\n        xfbml: true,\n        version: 'v5.0',\n      }\n    }),\n  }\n});\n```\n\nSubscribe to `user` changes. Every time user logs in this callback is called. When\nuser logs out, `user` is set to `null`.\n\n```js\nauthenticator.onchange = (user) =\u003e {\n   //\n};\n```\n\nSign-in with selected provider.\n\n```js\nuser = await authenticator.signIn('google');\nuser = await authenticator.signIn('facebook');\n```\n\nSign-out.\n\n```js\nawait authenticator.signOut();\n```\n\n\n## License\n\n[Unlicense](LICENSE) \u0026mdash; public domain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fclient-passport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamich%2Fclient-passport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fclient-passport/lists"}