reCapture
v3が2018年に出てる。
画像選択がない。
クライアント側でtokenの取得 その後、サーバー経由でverify(score)の取得をする。
なんのverify? そのユーザの人間らしさ
GTMにこんな感じで埋めて、server側では、fetchのrequestに対応するrecaptca apiからの値を返す
code: example.html
<script>
grecaptcha.ready(function() {
grecaptcha.execute('reCAPTCHA_site_key', {action: 'homepage'}).then(
function(token) {
fetch("captcha?token=" + token).then( function(r){
r.json().then(function(data) {
p = document.createElement("p");
textNode = document.createTextNode(JSON.stringify(data));
p.appendChild(textNode);
document.body.appendChild(p);
});
})
});
});
</script>
通信エラー時の処理は入ってない。
recaptca の requestで 何らかのエラーがある場合も考える
GTM経由での導入?
ありかも。GTM自体をブロックするのは, サーバー側でbot判定?とするか?そもそもbotスコアが高くなるかも
参考:
cloud functionsからbotのscoreを返してもらう。
firebaseのよるhostingの例だが、hosting以外でも応用可能?
サーバー側で必要とする処理を再度サーバーに送る処理になるかもだが、、
google の login?情報を使っている。
it appears that Google is also using its cookies to determine whether someone is a human in reCaptcha v3 tests
After this story was published, Google reached out to say that reCaptcha’s API sends hardware and software information, including device and application data, back to Google for analysis, and that the service is only used to fight spam and abuse.
論点の提示もあり、役に立った。
当面、v2系のreCAPTCHAとreCAPTCHA v3は並行してサポートしていくようです。現状は目的によって利用するreCAPTCHAが選択できる状況と考えて良いようです。
未だ やってみてない。
google への loginは、通常であれば、2段階認証を要求されそうで、無理だと思ってる。