{"id":28279132,"url":"https://github.com/cnrdh/scrypt_basic_auth","last_synced_at":"2026-04-29T09:37:08.217Z","repository":{"id":62888941,"uuid":"563327544","full_name":"cnrdh/scrypt_basic_auth","owner":"cnrdh","description":"Basic HTTP auth with scrypt verification for Deno","archived":false,"fork":false,"pushed_at":"2022-11-08T12:56:14.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-07T17:35:48.434Z","etag":null,"topics":["authentication","deno","http"],"latest_commit_sha":null,"homepage":"https://deno.land/x/scrypt_basic_auth","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/cnrdh.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-11-08T11:40:59.000Z","updated_at":"2022-11-12T10:44:17.000Z","dependencies_parsed_at":"2022-11-08T14:45:28.060Z","dependency_job_id":null,"html_url":"https://github.com/cnrdh/scrypt_basic_auth","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cnrdh/scrypt_basic_auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnrdh%2Fscrypt_basic_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnrdh%2Fscrypt_basic_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnrdh%2Fscrypt_basic_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnrdh%2Fscrypt_basic_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnrdh","download_url":"https://codeload.github.com/cnrdh/scrypt_basic_auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnrdh%2Fscrypt_basic_auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32420350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","deno","http"],"created_at":"2025-05-21T09:13:55.058Z","updated_at":"2026-04-29T09:37:08.213Z","avatar_url":"https://github.com/cnrdh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scrypt_basic_auth\n\n[Basic HTTP authentication](https://www.rfc-editor.org/rfc/rfc7617) for\n[Deno](https://deno.land), featuring\n[scrypt](https://www.rfc-editor.org/rfc/rfc7914) verification of hashed\npasswords\n\nFeatures:\n\n- Written in TypeScript\n- 100% test coverage\n- Hash verification in WebAssembly via https://deno.land/x/scrypt\n\n[Demo](https://scrypt-basic-auth.deno.dev/) [`user1` / `password1`]\n\n## Use\n\n### Basic :)\n\nAllowed users are read from the environment variable `scrypt_basic_auth_users`:\n\n```js\nimport { scryptBasicAuth } from \"https://deno.land/x/scrypt_basic_auth@1.0.1/mod.ts\";\n\nconst scryptProtected = (request) =\u003e {\n  const response = await scryptBasicAuth(request);\n  if (!response.ok) {\n    return response;\n  }\n  // Continue with authenticated user\n  return new Response(\"Authenticated\");\n};\nDeno.serve(scryptProtected);\n```\n\n### Advanced configuration\n\nThe `scryptBasicAuth` handler function is highly configurable. You may for\nexample inject a custom verifier:\n\n```js\nimport { verify as argon2Verify } from \"https://deno.land/x/argon2@v0.9.2/lib/mod.ts\";\n\nconst options = {\n  verify: async (password, hash) =\u003e await argon2Verify(hash, password),\n};\nconst response = await scryptBasicAuth(request, options);\n```\n\n## Users and hash generation\n\n### Env format\n\nThe `scrypt_basic_auth_users` env variable must store users as a JSON array of\n[username, hash] tuples.\n\n```bash\nexport scrypt_basic_auth_users='[[\"username\",\"c2N…\"]]'\n```\n\nTo obtain a tuple, run:\n\n```sh\n$ deno run hash.ts user1 password1\n[\"user1\",\"c2…\"]\n```\n\n## Test\n\n```sh\n$ deno task test\n```\n\n## License\n\n[scrypt_basic_auth](https://github.com/cnrdh/scrypt_basic_auth) is\n[MIT](https://github.com/cnrdh/scrypt_basic_auth/blob/main/LICENSE) licensed and\ncontains portions of code from\n[kt3k/basic_auth](https://github.com/kt3k/basic_auth) (also MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnrdh%2Fscrypt_basic_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnrdh%2Fscrypt_basic_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnrdh%2Fscrypt_basic_auth/lists"}