{"id":25849568,"url":"https://github.com/fjcaetano/recaptcha","last_synced_at":"2025-04-04T22:06:08.677Z","repository":{"id":19809864,"uuid":"85870629","full_name":"fjcaetano/ReCaptcha","owner":"fjcaetano","description":"[In]visible ReCaptcha v2 for iOS","archived":false,"fork":false,"pushed_at":"2023-09-18T20:22:27.000Z","size":1310,"stargazers_count":272,"open_issues_count":15,"forks_count":134,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-28T21:04:51.039Z","etag":null,"topics":["google","reactive","recaptcha","rxswift","swift","webview"],"latest_commit_sha":null,"homepage":"http://blog.flaviocaetano.com/post/recaptcha-reaches-1-dot-0/","language":"Swift","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/fjcaetano.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2017-03-22T20:00:10.000Z","updated_at":"2025-02-01T05:09:58.000Z","dependencies_parsed_at":"2023-01-13T20:36:18.862Z","dependency_job_id":"f49a9c6f-7a14-4193-aef8-ff11a612801b","html_url":"https://github.com/fjcaetano/ReCaptcha","commit_stats":{"total_commits":118,"total_committers":12,"mean_commits":9.833333333333334,"dds":"0.17796610169491522","last_synced_commit":"3905e5b8e76ff1fda6b05b585895e3b2ae658bd5"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjcaetano%2FReCaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjcaetano%2FReCaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjcaetano%2FReCaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjcaetano%2FReCaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjcaetano","download_url":"https://codeload.github.com/fjcaetano/ReCaptcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256110,"owners_count":20909240,"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","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":["google","reactive","recaptcha","rxswift","swift","webview"],"created_at":"2025-03-01T11:28:56.741Z","updated_at":"2025-04-04T22:06:08.659Z","avatar_url":"https://github.com/fjcaetano.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReCaptcha\n\n[![Build Status](https://travis-ci.org/fjcaetano/ReCaptcha.svg?branch=master)](https://travis-ci.org/fjcaetano/ReCaptcha)\n[![codecov](https://codecov.io/gh/fjcaetano/ReCaptcha/branch/master/graph/badge.svg)](https://codecov.io/gh/fjcaetano/ReCaptcha)\n[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/fjcaetano/ReCaptcha/pulls)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-orange.svg)](https://github.com/Carthage/Carthage)\n[![Version](https://img.shields.io/cocoapods/v/ReCaptcha.svg?style=flat)](http://cocoapods.org/pods/ReCaptcha)\n[![License](https://img.shields.io/cocoapods/l/ReCaptcha.svg?style=flat)](http://cocoapods.org/pods/ReCaptcha)\n[![Platform](https://img.shields.io/cocoapods/p/ReCaptcha.svg?style=flat)](http://cocoapods.org/pods/ReCaptcha)\n\n-----\n\nAdd Google's [Invisible ReCaptcha v2](https://developers.google.com/recaptcha/docs/invisible) to your project. This library\nautomatically handles ReCaptcha's events and retrieves the validation token or notifies you to present the challenge if\ninvisibility is not possible.\n\n![Example Gif 2](https://raw.githubusercontent.com/fjcaetano/ReCaptcha/master/example2.gif)  ![Example Gif](https://raw.githubusercontent.com/fjcaetano/ReCaptcha/master/example.gif)\n\n#### _Warning_ ⚠️\n\nBeware that this library only works for ReCaptcha v2 Invisible keys! Make sure to check the reCAPTCHA\nv2 Invisible badge option when creating your [API Key](https://www.google.com/recaptcha/admin/create).\n\n![ReCaptcha v2 invisible key example](https://raw.githubusercontent.com/fjcaetano/ReCaptcha/master/example-v2-key.png)\n\nYou won't be able to use a ReCaptcha v3 key because it requires server-side validation. On v3, all\nchallenges succeed into a token which is then validated in the server for a score. For this reason,\na frontend app can't know on its own wether or not a user is valid since the challenge will always\nresult in a valid token.\n\n## Installation\n\nReCaptcha is available through [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage).\nTo install it, simply add the following line to your dependencies file:\n\n#### Cocoapods\n``` ruby\npod \"ReCaptcha\"\n# or\npod \"ReCaptcha/RxSwift\"\n```\n\n#### Carthage\n``` ruby\ngithub \"fjcaetano/ReCaptcha\"\n```\n\nCarthage will create two different frameworks named `ReCaptcha` and `ReCaptcha_RxSwift`, the latter containing the RxSwift\nextension for the ReCaptcha framework.\n\n## Usage\n\nThe reCAPTCHA keys can be specified as Info.plist keys or can be passed as parameters when instantiating ReCaptcha().\n\nFor the Info.plist configuration, add `ReCaptchaKey` and `ReCaptchaDomain` (with a protocol ex. http:// or https://) to your Info.plist and run:\n\n``` swift\nlet recaptcha = try? ReCaptcha()\n\noverride func viewDidLoad() {\n    super.viewDidLoad()\n\n    recaptcha?.configureWebView { [weak self] webview in\n        webview.frame = self?.view.bounds ?? CGRect.zero\n    }\n}\n\n\nfunc validate() {\n    recaptcha?.validate(on: view) { [weak self] (result: ReCaptchaResult) in\n        print(try? result.dematerialize())\n    }\n}\n```\n\nIf instead you prefer to keep the information out of the Info.plist, you can use:\n``` swift\nlet recaptcha = try? ReCaptcha(\n    apiKey: \"YOUR_RECAPTCHA_KEY\", \n    baseURL: URL(string: \"YOUR_RECAPTCHA_DOMAIN\")!\n)\n\n...\n```\n\nYou can also install the reactive subpod and use it with RxSwift:\n\n``` swift\nrecaptcha.rx.validate(on: view)\n    .subscribe(onNext: { (token: String) in\n        // Do something\n    })\n```\n\n#### Alternte endpoint\n\nIf your app has firewall limitations that may be blocking Google's API, the JS endpoint may be changed on initialization.\nIt'll then point to `https://www.recaptcha.net/recaptcha/api.js`:\n\n``` swift\npublic enum Endpoint {\n    case default, alternate\n}\n\nlet recaptcha = try? ReCaptcha(endpoint: .alternate) // Defaults to `default` when unset\n```\n\n## Help Wanted\n\nDo you love ReCaptcha and work actively on apps that use it? We'd love if you could help us keep improving it!\nFeel free to message us or to start contributing right away!\n\n## [Full Documentation](http://fjcaetano.github.io/ReCaptcha)\n\n## License\n\nReCaptcha is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjcaetano%2Frecaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjcaetano%2Frecaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjcaetano%2Frecaptcha/lists"}