
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
tencent-captcha
Advanced tools
A simple library of captcha based on tencentcloud-sdk-nodejs.
npm install tencent-captcha --save
You can see the client access CAPTCHA from this document for details.
<script src="https://ssl.captcha.qq.com/TCaptcha.js"></script>
var T_Captcha = new TencentCaptcha('your_tencentcloud_application_ID', function(res) {
//a callback from TencentCaptcha server
if (res && res.ret == 0) {
//success
T_Captcha.destroy();
//ajax request the relevant verification interface of the server.
//you can see the following step [Node.js usage] to perform server-side validation.
} else {
//failure
}
});
T_Captcha.show();
You can see the validation interface of Tencent Captcha from this document for details.
const TencentCaptcha = require('tencent-captcha');
const captcha = new TencentCaptcha({
secretId: 'your_tencentcloud_API_secretId',
secretKey: 'your_tencentcloud_API_secretKey',
appId: 'your_tencentcloud_application_ID',
appSecretKey: 'your_tencentcloud_application_secretKey'
});
try {
const res = await Captcha.validate(ticket, randstr, ip);
if (res.CaptchaCode === 1) {
//success
} else {
//failure
}
} catch(e) {
//catch tencentcloud-sdk-nodejs exception
}
You can get related secret ID and key from Tencent Cloud Console.
new TencentCaptcha(options);
options field description
captcha.validate(ticket, randstr, ip)
The Return value of this method is a promise, you can use async-await synchronizing code. You can see data structure returned from the interface of Tencent Captcha by document.
tencent-captcha is MIT licensed.
FAQs
A simple library of captcha based on tencentcloud-sdk-nodejs.
The npm package tencent-captcha receives a total of 1 weekly downloads. As such, tencent-captcha popularity was classified as not popular.
We found that tencent-captcha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.