{"id":22210363,"url":"https://github.com/lunarfoundation/web3forauth0actions","last_synced_at":"2025-07-27T10:31:29.641Z","repository":{"id":65341147,"uuid":"574627147","full_name":"lunarfoundation/Web3ForAuth0Actions","owner":"lunarfoundation","description":"Web3ForAuth0Actions allows developers to quickly introduce web3 capabilities into Auth0 Actions.","archived":false,"fork":false,"pushed_at":"2022-12-20T20:45:52.000Z","size":19,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-29T15:43:26.461Z","etag":null,"topics":["actions","auth0","crypto","lunar","web3"],"latest_commit_sha":null,"homepage":"https://lunar.io","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/lunarfoundation.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}},"created_at":"2022-12-05T18:16:04.000Z","updated_at":"2023-06-14T07:17:32.000Z","dependencies_parsed_at":"2023-01-30T01:45:17.553Z","dependency_job_id":null,"html_url":"https://github.com/lunarfoundation/Web3ForAuth0Actions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarfoundation%2FWeb3ForAuth0Actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarfoundation%2FWeb3ForAuth0Actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarfoundation%2FWeb3ForAuth0Actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarfoundation%2FWeb3ForAuth0Actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lunarfoundation","download_url":"https://codeload.github.com/lunarfoundation/Web3ForAuth0Actions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227795403,"owners_count":17821007,"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":["actions","auth0","crypto","lunar","web3"],"created_at":"2024-12-02T20:11:36.949Z","updated_at":"2024-12-02T20:11:38.148Z","avatar_url":"https://github.com/lunarfoundation.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://pbs.twimg.com/profile_images/1580214450430177280/J643pct6_400x400.jpg\" width=\"150\" alt=\"Lunar Foundation Logo\" /\u003e\n    \u003ch1\u003e \n    \u003ca href=\"https://www.lunar.io/\" target=\"_blank\" \u003eLunar Foundation \u003c/a\u003e\n    \u003c/h1\u003e\n    \u003ch2\u003eThe future of money is digital.\u003c/h2\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cbr /\u003e \n\n[![NPM Package][npm-badge]][npm-pkg-link]\n\n\u003c/div\u003e\n\n## Web3ForAuth0Actions\nBrought to you by the Lunar Foundation. https://lunar.io\n\nA library for web3 functionality that can be leveraged in Auth0 Actions. Requires [Sign In With Ethereum](https://marketplace.auth0.com/integrations/siwe) (SIWE). \n\n## Getting Started\n\n1. Open your Auth0 management console and navigate to 'Actions | Library' in the left-hand sidebar.\n2. Click \"Build Custom\" in the header.\n    - Select \"Login / Post Login\".\n    - Select \"Node 16\" for the Runtime.\n    - Click the \"Create\" button.\n3. Click on the \"Dependencies\" icon in the grey editor (the box icon).\n    - Type \"web3-for-auth0-actions\" in the textbox and click \"Create\".\n4. Paste in the following code :\n```javascript\nexports.onExecutePostLogin = async (event, api) =\u003e {\n\n  // SHEPARD: If you have other apps that don't use this Action, exclude those from execution via Rules or Actions.\n  if (event.client.client_id !== 'YOUR APP ID HERE') return;\n\n  const { Web3ForAuth0Actions } = require(\"web3-for-auth0-actions\");\n  const ContractAddress = \"YOUR CONTRACT ADDRESS HERE\";\n\n  Web3ForAuth0Actions.DebugMode = true;\n  // SHEPARD: Chain Id '56' is the BNB Chain Mainnet. \n  let [isValidReturn, returnMessage] = await Web3ForAuth0Actions.validateWalletBalance(event, 56, 1, ContractAddress);\n  console.log(`IsValidReturn: ${isValidReturn}`);\n  console.log(`ReturnMessage: ${returnMessage}`);\n  \n  // SHEPARD: Bounce anyone that doesn't have the minimum balance in their wallet.\n  if (!isValidReturn) {\n    api.access.deny(returnMessage);\n  }\n};\n```\n5. Click \"Deploy\" in the top right-hand corner.\n6. Click \"Flows\" under \"Actions\" in the left-hand side bar.\n7. Click \"Login\".\n8. On the right-hand side, under \"Add Action\", select \"Custom\".\n9. Drag your new Action into the Flow area.\n10. Click \"Apply\"\n11. Profit!!!\n\nYou now have some functioning badassery! \n\n\u003c!-- Link References --\u003e\n\n[npm-badge]: https://img.shields.io/npm/v/web3-for-auth0-actions?color=%236639E4\u0026logo=NPM\u0026style=for-the-badge\n[npm-pkg-link]: https://www.npmjs.com/package/web3-for-auth0-actions","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunarfoundation%2Fweb3forauth0actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunarfoundation%2Fweb3forauth0actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunarfoundation%2Fweb3forauth0actions/lists"}