{"id":31561085,"url":"https://github.com/dfinity/icp-js-auth","last_synced_at":"2025-10-05T02:51:07.650Z","repository":{"id":316733026,"uuid":"1061902560","full_name":"dfinity/icp-js-auth","owner":"dfinity","description":"Authentication library for Internet Computer web apps","archived":false,"fork":false,"pushed_at":"2025-10-03T11:54:13.000Z","size":244,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T13:32:05.917Z","etag":null,"topics":["authentication","br-protected-1","icp","internet-computer","internet-identity","typescript"],"latest_commit_sha":null,"homepage":"https://js.icp.build/auth","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfinity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-22T14:37:22.000Z","updated_at":"2025-10-02T07:24:42.000Z","dependencies_parsed_at":"2025-10-02T11:00:40.308Z","dependency_job_id":null,"html_url":"https://github.com/dfinity/icp-js-auth","commit_stats":null,"previous_names":["dfinity/icp-js-auth"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dfinity/icp-js-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Ficp-js-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Ficp-js-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Ficp-js-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Ficp-js-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfinity","download_url":"https://codeload.github.com/dfinity/icp-js-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Ficp-js-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395932,"owners_count":25979693,"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-10-04T02:00:05.491Z","response_time":63,"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":["authentication","br-protected-1","icp","internet-computer","internet-identity","typescript"],"created_at":"2025-10-05T02:51:06.599Z","updated_at":"2025-10-05T02:51:07.525Z","avatar_url":"https://github.com/dfinity.png","language":"TypeScript","readme":"# @icp-sdk/auth\n\n[![NPM Version](https://img.shields.io/npm/v/%40icp-sdk%2Fauth)](https://www.npmjs.com/package/@icp-sdk/auth)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nAuthentication library for Internet Computer web apps.\n\n\u003e Still using `@dfinity/auth-client`? Migrate to [`@icp-sdk/auth`](https://js.icp.build/auth/latest/upgrading/v4)!\n\n---\n\n## Installation\n\nYou can install the `@icp-sdk/auth` package with your package manager of choice:\n\n### npm\n\n```shell\nnpm install @icp-sdk/auth\n```\n\n### pnpm\n\n```shell\npnpm add @icp-sdk/auth\n```\n\n### yarn\n\n```shell\nyarn add @icp-sdk/auth\n```\n\n\u003e Note: this package is only meant to be used in **browser** environments.\n\n## Usage Example\n\nHere's a simple example of how to use the `@icp-sdk/auth` package to authenticate a user with Internet Identity on an Internet Computer web app:\n\n```typescript\nimport { AuthClient } from '@icp-sdk/auth/client';\n\nconst identityProvider = 'https://id.ai/';\n\nconst authClient = await AuthClient.create();\nconst identity = authClient.getIdentity(); // At this point, you'll get a Principal.anonymous()\n\nasync function onSuccess() {\n  console.log('Login successful');\n\n  const identity = authClient.getIdentity(); // At this point, you'll get an authenticated identity\n  console.log(authClient.isAuthenticated()); // true\n}\n\nawait authClient.login({\n  identityProvider,\n  onSuccess,\n});\n\n// later in your app\nawait authClient.logout();\n```\n\nAdditional documentation can be found [here](https://js.icp.build/auth/latest/).\n\n## Contributing\n\nContributions are welcome! Please see the [contribution guide](./.github/CONTRIBUTING.md) for more information.\n\n## License\n\nThis project is licensed under the [Apache-2.0](./LICENSE) license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Ficp-js-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfinity%2Ficp-js-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Ficp-js-auth/lists"}