{"id":48528927,"url":"https://github.com/tinywasm/user","last_synced_at":"2026-04-07T23:30:43.800Z","repository":{"id":339656674,"uuid":"1161914549","full_name":"tinywasm/user","owner":"tinywasm","description":"user management library","archived":false,"fork":false,"pushed_at":"2026-04-03T02:56:35.000Z","size":236,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T08:55:47.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tinywasm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["cdvelop"]}},"created_at":"2026-02-19T17:00:45.000Z","updated_at":"2026-04-03T02:56:38.000Z","dependencies_parsed_at":"2026-02-21T01:03:01.199Z","dependency_job_id":null,"html_url":"https://github.com/tinywasm/user","commit_stats":null,"previous_names":["tinywasm/user"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/tinywasm/user","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fuser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fuser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fuser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fuser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinywasm","download_url":"https://codeload.github.com/tinywasm/user/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fuser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-04-07T23:30:42.094Z","updated_at":"2026-04-07T23:30:43.792Z","avatar_url":"https://github.com/tinywasm.png","language":"Go","funding_links":["https://github.com/sponsors/cdvelop"],"categories":[],"sub_categories":[],"readme":"# tinywasm/user\n\u003cimg src=\"docs/img/badges.svg\"\u003e\n\nUser management library for the tinywasm ecosystem. Handles user entities,\npassword authentication, OAuth providers (Google, Microsoft), LAN (local network)\nauthentication by RUT + IP, and session management.\nApplications import `tinywasm/user` directly to configure session behaviour, and use its\n**isomorphic UI modules** for authentication workflows.\n\n## Documentation\n\n- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — What \u0026 Why: schema, contracts, design principles\n- [docs/SKILL.md](docs/SKILL.md) — API contract, configuration, UI modules, and usage snippets\n\n\u003e **Note**: RBAC is now integrated into the User module (see ARCHITECTURE.md).\n\n## Diagrams\n\n- [docs/diagrams/AUTH_FLOW.md](docs/diagrams/AUTH_FLOW.md) — Local login credential validation\n- [docs/diagrams/SESSION_FLOW.md](docs/diagrams/SESSION_FLOW.md) — Session lifecycle\n- [docs/diagrams/USER_CRUD_FLOW.md](docs/diagrams/USER_CRUD_FLOW.md) — User creation pipeline\n- [docs/diagrams/OAUTH_FLOW.md](docs/diagrams/OAUTH_FLOW.md) — OAuth begin/callback flow (all branches)\n- [docs/diagrams/LAN_AUTH_FLOW.md](docs/diagrams/LAN_AUTH_FLOW.md) — LAN login: RUT validation + IP allowlist check\n- [docs/diagrams/LAN_IP_FLOW.md](docs/diagrams/LAN_IP_FLOW.md) — LAN IP management: RegisterLAN, AssignLANIP, RevokeLANIP, GetLANIPs, UnregisterLAN\n\n## Initialization\n\n```go\nimport \"github.com/tinywasm/user\"\n\n// ...\n\n// Initialize the user module directly with an ORM db instance\nerr := user.Init(db, user.Config{\n    CookieName: \"session_id\", // default: \"session\"\n    TokenTTL:   86400,        // default: 86400 (24h)\n    TrustProxy: true,         // default: false\n    OAuthProviders: []user.OAuthProvider{\n        \u0026user.GoogleProvider{\n            ClientID:     os.Getenv(\"GOOGLE_CLIENT_ID\"),\n            ClientSecret: os.Getenv(\"GOOGLE_CLIENT_SECRET\"),\n            RedirectURL:  \"https://example.com/oauth/callback\",\n        },\n    },\n})\nif err != nil {\n    // handle error\n}\n```\n\nFor detailed API usage and module integration guidance, refer to [docs/SKILL.md](docs/SKILL.md).\n\n## Status\n\n\u003e Implementation pending. Documentation complete.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywasm%2Fuser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinywasm%2Fuser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywasm%2Fuser/lists"}