{"id":47142086,"url":"https://github.com/eznix86/nostr-auth","last_synced_at":"2026-04-01T19:56:15.751Z","repository":{"id":343552228,"uuid":"1178192160","full_name":"eznix86/nostr-auth","owner":"eznix86","description":"Authentication Server with Nostr","archived":false,"fork":false,"pushed_at":"2026-03-31T22:02:32.000Z","size":40716,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":0,"default_branch":"0.x","last_synced_at":"2026-04-01T01:13:02.464Z","etag":null,"topics":["authentication","authorization","nostr"],"latest_commit_sha":null,"homepage":"https://nostr-auth.brunobernard.dev/","language":"Go","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/eznix86.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,"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":"2026-03-10T19:31:01.000Z","updated_at":"2026-03-20T16:00:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a829cc8-5fa3-406c-8816-2835d6eb57a2","html_url":"https://github.com/eznix86/nostr-auth","commit_stats":null,"previous_names":["eznix86/nostr-auth"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/eznix86/nostr-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eznix86%2Fnostr-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eznix86%2Fnostr-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eznix86%2Fnostr-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eznix86%2Fnostr-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eznix86","download_url":"https://codeload.github.com/eznix86/nostr-auth/tar.gz/refs/heads/0.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eznix86%2Fnostr-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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","authorization","nostr"],"created_at":"2026-03-12T22:09:32.509Z","updated_at":"2026-04-01T19:56:15.743Z","avatar_url":"https://github.com/eznix86.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nostr Auth\n\n![Demo GIF](./art/demo.gif)\n\nNostr Auth lets you keep your identity while providing a simple way to manage access to your platforms. It makes your identity portable across web applications, so you can use Nostr-based authentication with existing services — without introducing unnecessary complexity.\n\n## Why Nostr Auth?\n\nExisting authentication solutions are powerful and widely adopted in the web2 world, but they are not always a natural fit for Nostr-based users. Nostr Auth sits in front of your existing web applications and adds a Nostr-based authentication layer, so you can protect resources while preserving your users' portable identity.\n\n## Use Cases\n\n- Adding Nostr authentication to existing web applications\n- Protecting internal or private resources\n- Enabling identity-based access control for Nostr users\n- Protecting multiple configured upstream domains behind a single auth app\n\n\u003e [!NOTE]\n\u003e This version uses cookie-based authentication for the auth app itself, but it can still protect multiple configured upstream domains through the forward-auth flow. Redirect targets are restricted to domains configured under `auth.apps`.\n\n## Requirements\n\n- [Taskfile](https://taskfile.dev/)\n- Go 1.26+\n- Overmind (`go install github.com/air-verse/air@latest`)\n- Air (`go install github.com/air-verse/air@latest`)\n- Golangci-lint (`go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest`)\n- [bun](https://bun.sh/)\n- Docker and Docker Compose (to try demo)\n\n## Running Locally\n\n- Fork\n- `bun install`\n- `go install`\n- `cp config.json.example config.json`\n- Edit the `config.json`\n- `cp .env.example .env`\n- Edit the `.env`\n- `task dev`\n\nShould be available on http://localhost:3000\n\n## Config\n\n`config.json` controls both access rules and branding.\n\n```json\n{\n  \"auth\": {\n    \"enabled\": true,\n    \"groups\": {\n      \"admins\": [\n        \"npub1...\"\n      ]\n    },\n    \"apps\": {\n      \"default\": {\n        \"config\": {\n          \"domains\": [\n            \"app.example.com\"\n          ]\n        },\n        \"users\": [\n          \"group:admins\"\n        ]\n      },\n      \"public\": {\n        \"config\": {\n          \"domains\": [\n            \"demo.example.com\"\n          ]\n        },\n        \"users\": [\n          \"*\"\n        ]\n      }\n    }\n  },\n  \"branding\": {\n    \"background\": {\n      \"source\": {\n        \"type\": \"preset\",\n        \"variant\": \"canyon-falls\"\n      }\n    }\n  }\n}\n```\n\n- `auth.enabled` turns authorization on or off\n- `auth.groups` defines reusable user groups with `npub`, hex public keys, or nested `group:\u003cname\u003e` references\n- `auth.apps` defines which domains are protected and which users or groups can access them\n- `auth.apps.*.users` accepts `*` to allow any authenticated Nostr user for that app's configured domain\n- `auth.apps.*.config.domain` or `auth.apps.*.config.domains` also define the allowed post-login redirect targets\n- `branding.background.source.type` currently supports `preset`\n- `branding.background.source.variant` can be `canyon-falls` (default), `fields-road`, `mountain-valley`, or `storm-valley`\n- if `branding` is omitted, the app falls back to `canyon-falls`\n\n\u003e [!IMPORTANT]\n\u003e Authorization is pubkey-based. NIP-05 values are not supported in authorization rules and are ignored with a warning because they are not a safe basis for access control.\n\n## Testing Demo\n\n- `bun install`\n- `go install`\n- `task demo` — check out the examples [README.md](./examples/proxy/README.md)\n\n## Supports\n\n- Kubernetes Gateway API\n- Kubernetes Ingress\n- Nginx\n- Traefik\n- Envoy\n- Caddy\n\n## License\n\n[MIT](./LICENSE)\n\n## Credits\n\n- Photo by \u003ca href=\"https://unsplash.com/@wilstewart3\"\u003eWil Stewart\u003c/a\u003e on \u003ca href=\"https://unsplash.com/photos/landscape-photography-of-brown-mountain-pHANr-CpbYM\"\u003eUnsplash\u003c/a\u003e\n\n- Photo by \u003ca href=\"https://sandeep.ramgolam.com/\"\u003eSandeep Ramgolam\u003c/a\u003e on \u003ca href=\"https://sandeep.ramgolam.com/wallpapers\"\u003eWallpapers\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feznix86%2Fnostr-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feznix86%2Fnostr-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feznix86%2Fnostr-auth/lists"}