Skip to content
This repository was archived by the owner on Aug 17, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,22 @@ app.controller('myController', ['$scope', 'vcRecaptchaService', function ($scope
}]);
```

Secure Token
------------

If you want to use a secure token pass it along with the site key as an html attribute.

```html
<div
vc-recaptcha
key="'---- YOUR PUBLIC KEY GOES HERE ----'"
stoken="'--- YOUR GENERATED SECURE TOKEN ---'"
></div>
```

Please note that you have to enrypt your token yourself with your private key upfront!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick here enrypt should be encrypt

To learn more about secure tokens and how to generate & encrypt them please refer to the [reCAPTCHA Docs](https://developers.google.com/recaptcha/docs/secure_token).


Differences with the old reCaptcha
----------------------------------
Expand Down
6 changes: 4 additions & 2 deletions release/angular-recaptcha.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* angular-recaptcha build:2015-08-26
* angular-recaptcha build:2016-01-19
* https://github.com/vividcortex/angular-recaptcha
* Copyright (c) 2015 VividCortex
* Copyright (c) 2016 VividCortex
**/

/*global angular, Recaptcha */
Expand Down Expand Up @@ -119,6 +119,7 @@
scope: {
response: '=?ngModel',
key: '=',
stoken: '=?',
theme: '=?',
size: '=?',
tabindex: '=?',
Expand Down Expand Up @@ -167,6 +168,7 @@

vcRecaptcha.create(elm[0], key, callback, {

stoken: scope.stoken || attrs.stoken || null,
theme: scope.theme || attrs.theme || null,
tabindex: scope.tabindex || attrs.tabindex || null,
size: scope.size || attrs.size || null
Expand Down
6 changes: 3 additions & 3 deletions release/angular-recaptcha.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
scope: {
response: '=?ngModel',
key: '=',
stoken: '=?',
theme: '=?',
size: '=?',
tabindex: '=?',
Expand Down Expand Up @@ -64,6 +65,7 @@

vcRecaptcha.create(elm[0], key, callback, {

stoken: scope.stoken || attrs.stoken || null,
theme: scope.theme || attrs.theme || null,
tabindex: scope.tabindex || attrs.tabindex || null,
size: scope.size || attrs.size || null
Expand Down