{"id":13683704,"url":"https://github.com/magiclabs/magic-js","last_synced_at":"2026-04-09T14:07:55.015Z","repository":{"id":39741936,"uuid":"239957242","full_name":"magiclabs/magic-js","owner":"magiclabs","description":"Magic browser/React Native JavaScript SDK is your entry-point to integrating passwordless authentication inside your application.","archived":false,"fork":false,"pushed_at":"2026-02-16T15:48:31.000Z","size":13422,"stargazers_count":478,"open_issues_count":27,"forks_count":128,"subscribers_count":21,"default_branch":"master","last_synced_at":"2026-02-16T22:05:44.708Z","etag":null,"topics":["authentication","identity","jamstack","javascript","passwordless"],"latest_commit_sha":null,"homepage":"https://docs.magic.link/embedded-wallets/sdk/client-side/javascript","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/magiclabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2020-02-12T08:03:32.000Z","updated_at":"2026-02-16T06:36:01.000Z","dependencies_parsed_at":"2026-02-04T01:01:25.079Z","dependency_job_id":null,"html_url":"https://github.com/magiclabs/magic-js","commit_stats":{"total_commits":1637,"total_committers":47,"mean_commits":"34.829787234042556","dds":0.7556505803298718,"last_synced_commit":"7e2962a1da6550140a66556b7deb471685447a13"},"previous_names":["fortmatic/magic-js"],"tags_count":4563,"template":false,"template_full_name":null,"purl":"pkg:github/magiclabs/magic-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclabs","download_url":"https://codeload.github.com/magiclabs/magic-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-js/sbom","scorecard":{"id":408001,"data":{"date":"2025-08-11","repo":{"name":"github.com/magiclabs/magic-js","commit":"3db2a3ff44e33ba0f2c84630f616bde1362b9e21"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":5,"reason":"Found 15/30 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/canary.yml:52","Info: jobLevel 'contents' permission set to 'read': .github/workflows/publish.yml:68","Warn: no topLevel permission defined: .github/workflows/canary.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/canary.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/canary.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/canary.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/canary.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/canary.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/canary.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclabs/magic-js/test.yml/master?enable=pin","Info:   0 out of  16 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"30 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-8rgj-285w-qcq4","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-8m45-2rjm-j347","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-8hc4-vh64-cxmj","Warn: Project is vulnerable to: GHSA-3gc7-fjrx-p6mg","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T21:53:23.108Z","repository_id":39741936,"created_at":"2025-08-18T21:53:23.109Z","updated_at":"2025-08-18T21:53:23.109Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29565015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"ssl_error","status_checked_at":"2026-02-18T00:45:26.718Z","response_time":100,"last_error":"SSL_read: 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":["authentication","identity","jamstack","javascript","passwordless"],"created_at":"2024-08-02T13:02:24.891Z","updated_at":"2026-02-18T03:12:00.106Z","avatar_url":"https://github.com/magiclabs.png","language":"TypeScript","readme":"  \u003cp align=\"left\"\u003e\n    \u003ca href=\"https://docs.magic.link/home/welcome\"\u003e\n      \u003cimg src=\"https://media.graphassets.com/T9TXZhcNRVm211eyMh3u\" alt=\"Logo\" width=\"270\" height=\"auto\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\n# Magic JavaScript SDK\n\n\u003e The Magic JavaScript SDK empowers developers to provide frictionless web3 onboarding to their end-users while preserving their security and privacy using non-custodial wallets.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/magiclabs/magic-js/blob/master/LICENSE\"\u003eLicense\u003c/a\u003e ·\n  \u003ca href=\"https://github.com/magiclabs/magic-js/blob/master/CHANGELOG.md\"\u003eChangelog\u003c/a\u003e ·\n  \u003ca href=\"https://github.com/magiclabs/magic-js/blob/master/CONTRIBUTING.md\"\u003eContributing Guide\u003c/a\u003e\n\u003c/p\u003e\n\n## 📖 Documentation\n\n- See the [developer documentation](https://docs.magic.link) to learn how you can master the Magic SDK in a matter of minutes.\n- See the `@magic-sdk/react-native-bare` [README](https://github.com/magiclabs/magic-js/tree/master/packages/%40magic-sdk/react-native-bare#readme) for Bare React Native package specific information.\n- See the `@magic-sdk/react-native-expo` [README](https://github.com/magiclabs/magic-js/tree/master/packages/%40magic-sdk/react-native-expo#readme) for Expo React Native package specific information.\n\n## ⚡️ Quickstart\n\n### Installation\n\nIntegrating your app with Magic will require our client-side NPM package:\n\n```bash\n# Via NPM:\nnpm install --save magic-sdk # If you're targeting web browsers\nnpm install --save @magic-sdk/react-native-bare # If you're targeting Bare React Native\nnpm install --save @magic-sdk/react-native-expo # If you're targeting Expo React Native\n\n# Via Yarn:\nyarn add magic-sdk # If you're targeting web browsers\nyarn add @magic-sdk/react-native-bare # If you're targeting Bare React Native\nyarn add @magic-sdk/react-native-expo # If you're targeting Expo React Native\n```\n\nAlternatively, you can load via CDN by adding a script tag to your app’s `\u003chead\u003e`:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/magic-sdk/dist/magic.js\"\u003e\u003c/script\u003e\n```\n\n### Usage\n\nSign up or log in to the [developer dashboard](https://dashboard.magic.link) to receive API keys that will allow your application to interact with Magic's authentication APIs.\n\nThen, you can start authenticating users with _just one method!_ Magic works across all modern desktop, mobile Chrome, Safari and Firefox browsers.\n\n```ts\nimport { Magic } from 'magic-sdk';\nimport { ethers } from 'ethers';\n\nconst magic = new Magic('YOUR_API_KEY', {\n  network: 'sepolia',\n});\n\nconst provider = new ethers.BrowserProvider(magic.rpcProvider);\nconst accounts = await magic.wallet.connectWithUI();\n```\n\nWith network switching:\n\n\u003e Network switching is available on web SDK version 31.0.0+ and React Native SDKs version 32.0.0+\n\n```ts\nimport { Magic } from 'magic-sdk';\nimport { SolanaExtension } from '@magic-ext/solana';\nimport { EVMExtension } from '@magic-ext/evm';\nimport { ethers } from 'ethers';\n\nconst customPolygonOptions = {\n  rpcUrl: 'https://polygon-rpc.com/', // Polygon RPC URL\n  chainId: 137, // Polygon chain id\n  default: true, // Set as default network\n};\n\nconst customOptimismOptions = {\n  rpcUrl: 'https://mainnet.optimism.io',\n  chainId: 10,\n};\n\nconst magic = new Magic(API_KEY, {\n  extensions: [\n    new EVMExtension([customPolygonOptions, customOptimismOptions]),\n    new SolanaExtension({\n      rpcUrl: 'https://api.devnet.solana.com',\n    }),\n  ],\n});\n\nconst provider = new ethers.BrowserProvider(magic.rpcProvider);\n\nconst network = await provider.getNetwork();\nconsole.log(network.chainId); // =\u003e 137\n\nmagic.evm.switchChain(10);\n\nconst network = await provider.getNetwork();\nconsole.log(network.chainId); // =\u003e 10\n\nconst solanaPublicAddress = await magic.solana.getPublicAddress();\nconsole.log(solanaPublicAddress); // =\u003e \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\"\n```\n\n## 📦 Package Ecosystem\n\n### Entry points\n\nThese are packages you can install to enable Magic JS SDK functionality for your client-side application.\n\n| Package Name                                                                                 | Changelog                                                         | Description                                  |\n| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------------------- |\n| [`magic-sdk`](https://www.npmjs.com/package/magic-sdk)                                       | [CHANGELOG](./packages/magic-sdk/CHANGELOG.md)                    | Web/browser entry-point for Magic SDK.       |\n| [`@magic-sdk/react-native-bare`](https://www.npmjs.com/package/@magic-sdk/react-native-bare) | [CHANGELOG](./packages/@magic-sdk/react-native-bare/CHANGELOG.md) | Bare React Native entry-point for Magic SDK. |\n| [`@magic-sdk/react-native-expo`](https://www.npmjs.com/package/@magic-sdk/react-native-expo) | [CHANGELOG](./packages/@magic-sdk/react-native-expo/CHANGELOG.md) | Expo React Native entry-point for Magic SDK. |\n\n## Extensions\n\nExtend Magic JS SDK functionality for your use-case through [`@magic-ext/*` packages](./packages/@magic-ext).\n\n### Internals\n\nThese are packages Magic JS SDK uses internally to work seamlessly across platforms.\n\n| Package Name                                                               | Changelog                                                | Description                                                              |\n| -------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------ |\n| [`@magic-sdk/types`](https://www.npmjs.com/package/@magic-sdk/types)       | [CHANGELOG](./packages/@magic-sdk/types/CHANGELOG.md)    | Core typings shared between JavaScript entry-points of Magic SDK.        |\n| [`@magic-sdk/provider`](https://www.npmjs.com/package/@magic-sdk/provider) | [CHANGELOG](./packages/@magic-sdk/provider/CHANGELOG.md) | Core business logic shared between JavaScript entry-points of Magic SDK. |\n\n## 🚦 Testing\n\nRun tests for all packages\n\n```bash\nyarn test\n```\n\nTest an individual package\n\n```bash\nPKG=magic-sdk yarn test\nPKG=@magic-sdk/react-native-bare yarn test\nPKG=@magic-sdk/react-native-expo yarn test\n```\n\nTest specific files\n\n```bash\nyarn test /test/**/constructor.spec.ts\n```\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclabs%2Fmagic-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclabs%2Fmagic-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclabs%2Fmagic-js/lists"}