{"id":13880934,"url":"https://github.com/magiclabs/magic-admin-js","last_synced_at":"2025-04-06T02:10:22.990Z","repository":{"id":40837509,"uuid":"241752620","full_name":"magiclabs/magic-admin-js","owner":"magiclabs","description":"Magic admin Node.js SDK makes it easy to leverage Decentralized ID tokens to protect routes and restricted resources for your application.","archived":false,"fork":false,"pushed_at":"2024-04-23T16:00:57.000Z","size":609,"stargazers_count":76,"open_issues_count":17,"forks_count":33,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-10-30T02:37:30.888Z","etag":null,"topics":["authentication","identity","jamstack","javascript","nodejs","passwordless"],"latest_commit_sha":null,"homepage":"https://docs.magic.link/admin-sdk/node-js","language":"TypeScript","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/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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-19T23:52:14.000Z","updated_at":"2024-10-02T14:23:58.000Z","dependencies_parsed_at":"2023-10-04T00:02:34.116Z","dependency_job_id":"b9213aa1-e0e4-487f-a875-0d6f7b148f4b","html_url":"https://github.com/magiclabs/magic-admin-js","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclabs","download_url":"https://codeload.github.com/magiclabs/magic-admin-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423515,"owners_count":20936626,"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","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","nodejs","passwordless"],"created_at":"2024-08-06T08:03:40.931Z","updated_at":"2025-04-06T02:10:22.970Z","avatar_url":"https://github.com/magiclabs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Magic Authentication Admin Javascript SDK\n\n[![Publish](https://github.com/magiclabs/magic-admin-js/actions/workflows/publish.yml/badge.svg?branch=master)](https://github.com/magiclabs/magic-admin-js/actions/workflows/publish.yml)\n\u003e The Magic Admin SDK lets developers secure endpoints, manage users, and create middlewares via easy-to-use utilities.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"./LICENSE\"\u003eLicense\u003c/a\u003e ·\n  \u003ca href=\"./CHANGELOG.md\"\u003eChangelog\u003c/a\u003e ·\n  \u003ca href=\"./CONTRIBUTING.md\"\u003eContributing Guide\u003c/a\u003e\n\u003c/p\u003e\n\n## 📖 Documentation\n\nSee the [developer documentation](https://magic.link/docs/api-reference/server-side-sdks/node) to learn how you can master the Magic Admin SDK in a matter of minutes.\n\n## 🔗 Installation\n\nIntegrating your Node.js application with Magic will require our server-side NPM package:\n\n```bash\n# Via NPM:\nnpm install --save @magic-sdk/admin\n\n# Via Yarn:\nyarn add @magic-sdk/admin\n```\n\n## ⚡️ Quick Start\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 administration APIs.\n\n```ts\nconst { Magic } = require('@magic-sdk/admin');\n\n// In async function:\nconst magic = await Magic.init('YOUR_SECRET_API_KEY');\n// OR\nMagic.init('YOUR_SECRET_API_KEY').then((magic) =\u003e {\n  magic\n});\n// Validate a token\ntry {\n  magic.token.validate(\"DIDToken\");\n} catch (e) {\n  console.log(e);\n}\n// Magic Auth - Get User Email\ntry {\n  await magic.users.getMetadataByToken(\"DIDToken\");\n} catch (e) {\n  console.log(e);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclabs%2Fmagic-admin-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclabs%2Fmagic-admin-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclabs%2Fmagic-admin-js/lists"}