{"id":13550072,"url":"https://github.com/sebadob/leptos-captcha","last_synced_at":"2025-09-10T01:50:35.810Z","repository":{"id":214875020,"uuid":"737570887","full_name":"sebadob/leptos-captcha","owner":"sebadob","description":"Simple, fully self-hosted Captcha / PoW component for Leptos without any user interaction","archived":false,"fork":false,"pushed_at":"2025-06-13T18:14:55.000Z","size":47,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T20:42:26.760Z","etag":null,"topics":["captcha","leptos","proof-of-work","rust","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/sebadob.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}},"created_at":"2023-12-31T15:10:53.000Z","updated_at":"2025-07-13T23:40:14.000Z","dependencies_parsed_at":"2025-05-06T20:27:53.099Z","dependency_job_id":"4d3fe0c8-88e1-48ea-937d-1d879e229fb2","html_url":"https://github.com/sebadob/leptos-captcha","commit_stats":null,"previous_names":["sebadob/leptos-captcha"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sebadob/leptos-captcha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebadob%2Fleptos-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebadob%2Fleptos-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebadob%2Fleptos-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebadob%2Fleptos-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebadob","download_url":"https://codeload.github.com/sebadob/leptos-captcha/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebadob%2Fleptos-captcha/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274397763,"owners_count":25277400,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["captcha","leptos","proof-of-work","rust","wasm"],"created_at":"2024-08-01T12:01:28.652Z","updated_at":"2025-09-10T01:50:35.801Z","avatar_url":"https://github.com/sebadob.png","language":"Rust","funding_links":[],"categories":["Rust","Components"],"sub_categories":["Unofficial"],"readme":"# leptos-captcha\n\nThis is a simple Captcha component. Everything runs on the same backend without any external dependencies.  \nThe crate for the Proof of Work (PoW) being used is [spow](https://github.com/sebadob/spow), which is another project of\nmine. If you want to know more about the algorithm, please take a look at the repository.  \nNo user input, solving weird puzzles, or anything like that is needed. This provides a way better UX than the\ntraditional captchas out there.\n\nThis component is designed to be injected into a `\u003cform\u003e` for easy usage with leptos server_fn's, but you\ncan of course use it independently and build a custom solution, if you like. In that case you might consider to use\n[spow](https://github.com/sebadob/spow) directly.\n\nNo inline-css is being used on purpose for 2 reasons:\n- you are not forced to use an `unsafe-inline` CSP for `style-src`, if you don't like that\n- You can customize the whole look yourself.  \n\nYou need to import the `css/leptos-captcha.css` in your application in what ever way fits your needs,\nor simply copy \u0026 paste it into your current `main.scss`.\n\nThere is an [example](https://github.com/sebadob/leptos-captcha/tree/main/examples/axum-example) based on the official\n`start-axum` template. Just take a look at it, and it should (hopefully) be clear, how to use this component.\n\nAt this moment, it runs thread local. This means if you have a too high difficulty, it will block the UI.\nAn improvement with outsourcing it to a web worker will probably come at some point, even though you should not really\nneed it in production.\n\n![screenshot](https://github.com/sebadob/leptos-captcha/blob/main/leptos-captcha.png)\n\n## WASM getrandom Backend\n\nIf you compile to WASM, you need to specify the getrandom backend to use. To do this, create `.cargo/config.toml` and \npaste:\n\n```toml\n[target.wasm32-unknown-unknown]\nrustflags = ['--cfg', 'getrandom_backend=\"wasm_js\"']\n```\n\n## Leptos Compatibility\n\nLeptos 0.8: leptos-captcha 0.4  \nLeptos 0.7: leptos-captcha 0.3  \nLeptos 0.6: leptos-captcha 0.2  \nLeptos 0.5: leptos-captcha 0.1  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebadob%2Fleptos-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebadob%2Fleptos-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebadob%2Fleptos-captcha/lists"}