{"id":25768436,"url":"https://github.com/nodefactoryio/server-eth-auth","last_synced_at":"2026-05-12T21:09:34.144Z","repository":{"id":42767699,"uuid":"276866402","full_name":"NodeFactoryIo/server-eth-auth","owner":"NodeFactoryIo","description":"Validation of web3 signatures (i.e. from MetaMask) for server Ethereum authentication","archived":false,"fork":false,"pushed_at":"2023-01-06T10:31:43.000Z","size":343,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T07:02:40.724Z","etag":null,"topics":["authentication","ethereum","metamask","typescript"],"latest_commit_sha":null,"homepage":"","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/NodeFactoryIo.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":"2020-07-03T09:54:07.000Z","updated_at":"2021-04-11T00:13:35.000Z","dependencies_parsed_at":"2023-02-05T21:46:07.171Z","dependency_job_id":null,"html_url":"https://github.com/NodeFactoryIo/server-eth-auth","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"ChainSafe/typescript-lib-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeFactoryIo%2Fserver-eth-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeFactoryIo%2Fserver-eth-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeFactoryIo%2Fserver-eth-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeFactoryIo%2Fserver-eth-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NodeFactoryIo","download_url":"https://codeload.github.com/NodeFactoryIo/server-eth-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240959077,"owners_count":19884910,"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","ethereum","metamask","typescript"],"created_at":"2025-02-27T00:51:53.605Z","updated_at":"2025-11-21T00:04:55.714Z","avatar_url":"https://github.com/NodeFactoryIo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server-eth-auth\n![Build Status](https://img.shields.io/github/workflow/status/nodefactoryio/server-eth-auth/ci)\n![GitHub](https://img.shields.io/github/license/NodeFactoryIo/server-eth-auth)\n![Node](https://img.shields.io/node/v/@nodefactory/server-eth-auth)\n![Npm](https://img.shields.io/npm/v/@nodefactory/server-eth-auth)\n\nThis repository contains TypeScript implementation of validation for web3 signers\nsignatures used for authenticating on server.\n\n# Usage\n\nInstall with `yarn add @nodefactory/server-eth-auth` or `npm i @nodefactory/server-eth-auth`\n\nExample of usage:\n\n```typescript\nimport {EthAuth} from \"@nodefactory/server-eth-auth\";\n\nconst domain = \"Nodefactory\" // shown in signer when requesting signature\nconst ethAuth = new EthAuth(storage: IChallengeStorage, domain)\n\n// Creating challenge for sending to user for signature\nethAuth.createChallenge(userEthereumAddress);\n\nconst challengeHash = \"hash\" // user sent value that was created in createChallenge under challenge.message.value\nconst signature = \"signature\" // signature returned from signer\n// Validating user signature\nconst address = ethAuth.checkChallenge(challengeHash, signature)\n```\n\nThis package should be used in controller with 2 api endpoints:\n - challenge endpoint that returns created challenge for user given ethereum address\n - login endpoint that validates signature generated by signer with checkChallenge and creates and returns authentication token that can be later validated\n\nThis package requires for [IChallengeStorage](src/@types/index.d.ts) to be implemented to store created challenge hashes. Type of storage is open to choice (eg. db, cache, memory, etc.)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodefactoryio%2Fserver-eth-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodefactoryio%2Fserver-eth-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodefactoryio%2Fserver-eth-auth/lists"}