You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ The following options are available:
130
130
|`:site_key`| Override site API key from configuration |
131
131
|`:error`| Override the error code returned from the reCAPTCHA API (default: `nil`) |
132
132
|`:size`| Specify a size (default: `nil`) |
133
-
|`:nonce`| Optional. Sets nonce attribute for script. Can be generated via `SecureRandom.base64(32)`. (default: `nil`) |
133
+
|`:nonce`| Optional. Sets nonce attribute for script. Can be generated via `SecureRandom.base64(32)`. Use `content_security_policy_nonce` if you have `config.content_security_policy_nonce_generator` set in Rails. (default: `nil`) |
134
134
|`:id`| Specify an html id attribute (default: `nil`) |
135
135
|`:callback`| Optional. Name of success callback function, executed when the user submits a successful response |
136
136
|`:expired_callback`| Optional. Name of expiration callback function, executed when the reCAPTCHA response expires and the user needs to re-verify. |
@@ -208,7 +208,7 @@ It also accepts most of the options that `recaptcha_tags` accepts, including the
208
208
| Option | Description |
209
209
|---------------------|-------------|
210
210
|`:site_key`| Override site API key from configuration |
211
-
|`:nonce`| Optional. Sets nonce attribute for script tag. Can be generated via `SecureRandom.base64(32)`. (default: `nil`) |
211
+
|`:nonce`| Optional. Sets nonce attribute for script tag. Can be generated via `SecureRandom.base64(32)`. Use `content_security_policy_nonce` if you have `config.content_security_policy_nonce_generator` set in Rails. (default: `nil`) |
212
212
|`:id`| Specify an html id attribute (default: `nil`) |
213
213
|`:script`| Same as setting both `:inline_script` and `:external_script`. If you only need one or the other, use `:inline_script` and `:external_script` instead. |
214
214
|`:callback`| Optional. Name of success callback function, executed when the user submits a successful response |
@@ -432,7 +432,7 @@ but only accepts the following options:
432
432
|---------------------|-------------|
433
433
|`:site_key`| Override site API key |
434
434
|`:action`| The name of the [reCAPTCHA action](https://developers.google.com/recaptcha/docs/v3#actions). Actions are not case-sensitive and may only contain alphanumeric characters, slashes, and underscores, and must not be user-specific. |
435
-
|`:nonce`| Optional. Sets nonce attribute for script. Can be generated via `SecureRandom.base64(32)`. (default: `nil`) |
435
+
|`:nonce`| Optional. Sets nonce attribute for script. Can be generated via `SecureRandom.base64(32)`. Use `content_security_policy_nonce` if you have `config.content_security_policy_nonce_generator` set in Rails. (default: `nil`) |
436
436
|`:callback`| Name of callback function to call with the token. When `element` is `:input`, this defaults to a function named `setInputWithRecaptchaResponseTokenFor#{sanitize_action(action)}` that sets the value of the hidden input to the token. |
437
437
|`:id`| Specify a unique `id` attribute for the `<input>` element if using `element: :input`. (default: `"g-recaptcha-response-data-"` + `action`) |
438
438
|`:name`| Specify a unique `name` attribute for the `<input>` element if using `element: :input`. (default: `g-recaptcha-response-data[action]`) |
0 commit comments