Closed straussmarkus closed 8 months ago
Hello, you can use our JavaScript API to create and start invisible widgets:
const element = document.createElement("div"); // Create an element that is not part of the DOM
const myCustomWidget = new friendlyChallenge.WidgetInstance(element, {
doneCallback: (solution) => {
// Captcha is done solving, send the message and submit solution to server
},
})
function onMessageSend() {
myCustomWidget.reset();
myCustomWidget.start();
}
Keep in mind that you should still inform your users that FriendlyCaptcha is used. It will take a while for the Captcha to solve so it probably makes sense to show some kind of progress anyway
If you're looking at validating messages really often in short intervals (e.g. direct chat), what can work is handing out a token from your server that is either valid for the future X (minutes?) or can be used to send Y messages.
There is no real mechanism to do this without writing some code yourself - it really depends on your usecase and security requirements.
Is it possible to use friendly-challenge in a chat-style application in a way that I don't need to show the widget before submitting every single chat message? Looking to move from Google ReCaptcha v3 invisible validation.
Reading through the docs, it looks like this is currently not possible.