Web
Overview
This part provides the detailed description of all the configuration and APIs for deploying the CAPTCHA service to the web.
Requirements
Item | |
---|---|
Compatibility | IE9+, Chrome, Firefox, Safari, Opera, mainstream mobile browsers, and embedded Webview on iOS and Android |
Installation
Create an ID in GeeTest dashboard
Import initialization function
<script src="gt4.js"></script> |
Download gt4.js to your local and integrate it into your projecthttps://static.geetest.com/v4/gt4.js
- Call
initGeetest4
for initialization
initGeetest4( |
Please note the following:
CAPTCHA service has to be initialized while your web page is loading, otherwise, the verification shall not be able
to detect user`s behavioral data of how they operate on the page, resulting in invalid verification.For the initialization of multiple verification code scenarios on the same page, each verification code scenario needs to call the
initGeetest4
method for separate initialization; If there are multiple authentication entries in one scenario,multiple initializations are required.If you use captcha in
iframe
, you need to setsandbox="allow-scripts allow-popups"
to ensure the functional integrity of captcha.CaptchaId
is a parameter that must be configured. For optional configuration parameters refer to the
parameter configuration of Web API.
Here are the platforms we supported
H5 | Angular | React | Vue(2、3) | React-native | Flutter | Uniapp |
---|---|---|---|---|---|---|
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
H5:https://github.com/geetestweb/gt4-public-client-demo
Angular:https://github.com/geetestweb/gt4-public-client-demo/tree/angular
React:https://github.com/geetestweb/gt4-public-client-demo/tree/react
Vue3:https://github.com/geetestweb/gt4-public-client-demo/tree/vue3
React-native:https://github.com/geetestweb/gt4-public-client-demo/tree/react-native
Flutter:https://github.com/GeeTeam/gt4_flutter_plugin
Uniapp: https://github.com/geetestweb/gt4-public-client-demo/tree/uniapp