{"id":13507992,"url":"https://github.com/adanselm/exrecaptcha","last_synced_at":"2026-02-20T16:01:24.945Z","repository":{"id":21533194,"uuid":"24852486","full_name":"adanselm/exrecaptcha","owner":"adanselm","description":"Simple reCaptcha display/verify code for Elixir applications. Using Exrecaptcha with a CMS such as Phoenix is easy.","archived":false,"fork":false,"pushed_at":"2015-08-24T09:06:13.000Z","size":173,"stargazers_count":12,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-28T04:36:27.475Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adanselm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-06T15:49:24.000Z","updated_at":"2024-10-02T14:40:31.000Z","dependencies_parsed_at":"2022-08-21T03:40:09.885Z","dependency_job_id":null,"html_url":"https://github.com/adanselm/exrecaptcha","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adanselm/exrecaptcha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adanselm%2Fexrecaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adanselm%2Fexrecaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adanselm%2Fexrecaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adanselm%2Fexrecaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adanselm","download_url":"https://codeload.github.com/adanselm/exrecaptcha/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adanselm%2Fexrecaptcha/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29656589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"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":[],"created_at":"2024-08-01T02:00:45.107Z","updated_at":"2026-02-20T16:01:24.904Z","avatar_url":"https://github.com/adanselm.png","language":"Elixir","readme":"# Exrecaptcha\n\nSimple [ReCaptcha] display/verify code for Elixir applications.\nUsing Exrecaptcha with a CMS such as [Phoenix] is easy.\n\n[ReCaptcha]: http://www.google.com/recaptcha\n[Phoenix]: https://github.com/phoenixframework/phoenix\n\n## Installation\n\nSet as a dep in your mix.exs and ensure it is running with your app:\n\n```elixir\n  def application do\n    [\n      # ...\n      applications: [:phoenix, :cowboy, :logger, :exrecaptcha]\n      # ...\n    ]\n  end\n\n  defp deps do\n    [\n      {:phoenix, \"0.5.0\"},\n      {:cowboy, \"~\u003e 1.0.0\"},\n      #...\n      {:ibrowse, github: \"cmullaparthi/ibrowse\", tag: \"v4.1.0\"},\n      {:exrecaptcha, \"~\u003e 0.0.3\"}\n    ]\n  end\n```\n\nAnd fetch your project's dependencies:\n\n```bash\n$ mix deps.get\n```\n\n## Config\n\nIn your application's config.exs :\n\n```elixir\nconfig :exrecaptcha,\n  api_config: %{ verify_url: \"http://www.google.com/recaptcha/api/verify\",\n                 public_key: \"YOUR_PUBLIC_KEY\",\n                 private_key: \"YOUR_PRIVATE_KEY\" }\n```\n\nYou can use https instead of http for the `verify_url`.\n\n## Usage\n\n### View\n\nPut this code somewhere in your html template:\n\n```html\n\u003cform id=\"loginForm\" name=\"newuser\" method=\"post\" action=\"/users\"\u003e\n  ...\n  \u003c%= safe Exrecaptcha.display %\u003e\n  ...\n\u003c/form\u003e\n```\n\n### Controller\n\nProvided you've set the routing properly, you just have to call\n\n```elixir\n# your post method should route you here:\ndef create(conn, params) do\n  # do stuff, then check for the validity of the captcha\n  :ok = verify_captcha(conn, params)\nend\n\ndefp verify_captcha(conn, %{\"recaptcha_challenge_field\" =\u003e challenge,\n                            \"recaptcha_response_field\" =\u003e response}) do\n  remote_ip = conn.remote_ip\n  Exrecaptcha.verify(remote_ip, challenge, response)\nend\n```\n\n##TODO\n\n- No option for recaptcha display can be set yet\n- Error handling is quite inexistent (throws RuntimeError)\n- No tests\n\n## Changelog\n\n- 0.0.3: Update HTTPotion dependency, avoiding elixir version warnings\n- 0.0.2: Use HTTPS by default\n- 0.0.1: Initial release\n\n## Licensing\nCopyright © 2014 [Adrien Anselme](https://github.com/adanselm) and [contributors](https://github.com/adanselm/exrecaptcha/graphs/contributors)\nThis work is free. You can redistribute it and/or modify it under the\nterms of the Do What The Fuck You Want To Public License, Version 2,\nas published by Sam Hocevar. See the COPYING file for more details.\n","funding_links":[],"categories":["Framework Components"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadanselm%2Fexrecaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadanselm%2Fexrecaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadanselm%2Fexrecaptcha/lists"}