# `MishkaCmsCore.Captcha.Providers.Recaptcha`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/captcha/providers/recaptcha.ex#L5)

[Google reCAPTCHA](https://developers.google.com/recaptcha) as a captcha provider, in either of
its two kinds — a key is made for one of them in Google's admin console:

  * **v2** (`"v2"`) — the "I'm not a robot" box, drawn above the form's button;
  * **v3** (`"v3"`) — nothing to click: Google scores the visitor from 0 to 1 as the form is sent,
    and a score under `security.captcha.recaptcha.min_score` (out of 100) is refused. Google's
    badge shows in a corner of the page.

Each scope keeps its own site key, secret key, kind and lowest score. A token is good for two
minutes and one check; a v3 token must also name the form it was asked for.

Google's published v2 test keys (site key `6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI`, secret
`6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe`) pass every check on any address (`test?: true`), so
their answer is not held to the site's address, nor remembered as used. v3 has none: test it with a
key of its own that lists `localhost`.

# `error_return`

```elixir
@type error_return() ::
  {:error, [%{action: atom(), field: atom(), message: String.t()}]}
```

# `okey_return`

```elixir
@type okey_return() :: {:ok, struct() | map() | module() | [any()]}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `config`

```elixir
@spec config() :: keyword()
```

# `config`

```elixir
@spec config(atom()) :: any()
```

# `enable`

```elixir
@spec enable() :: okey_return() | error_return()
```

# `get`

```elixir
@spec get() :: keyword()
```

# `health_check`

```elixir
@spec health_check() :: :ok | {:degraded, term()} | {:error, term()}
```

Optional. See `c:MishkaInstaller.Event.Hook.health_check/0`. Override to report health.

# `on_dependency_error`

```elixir
@spec on_dependency_error(term()) :: term()
```

Optional. See `c:MishkaInstaller.Event.Hook.on_dependency_error/1`. Override to react.

# `register`

```elixir
@spec register() :: okey_return() | error_return()
```

# `restart`

```elixir
@spec restart() :: okey_return() | error_return()
```

# `start`

```elixir
@spec start() :: okey_return() | error_return()
```

# `start_link`

# `stop`

```elixir
@spec stop() :: okey_return() | error_return()
```

# `unregister`

```elixir
@spec unregister() :: okey_return() | error_return()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
