文章加密

;

2021年8月19日 星期四

recaptcha

 https://www.npmjs.com/package/vue-recaptcha


這邊自己開通一下,很簡單,基本開發要把localhost 127.0.0.1加進網域

https://www.google.com/recaptcha/admin/site/470756736/setup


example: 

 <vue-recaptcha 
                    ref="recaptcha"
                    sitekey="{{sitekey上google recaptcha取}}" 
                    :loadRecaptchaScript="true
                    :class="$style.recaptcha"
                    @verify="onCaptchaVerifired"
                    @expired="onCaptchaExpired"
                ></vue-recaptcha>




get the user’s response token:

https://developers.google.com/recaptcha/docs/verify

注意

@verify="onCaptchaVerifired"   // 在template不用(parameter)

public onCaptchaVerifired(res): void // 在method有要帶argument

http://www.blog.tonyswierz.com/javascript/add-and-use-google-recaptcha-in-a-vuejs-laravel-project/


說明v2 Invisible:

https://z3388638.medium.com/recaptcha-v2-invisible-%E4%B8%8D%E7%94%A8%E5%86%8D%E6%8A%8A-%E6%88%91%E4%B8%8D%E6%98%AF%E6%A9%9F%E5%99%A8%E4%BA%BA-%E5%88%97%E5%85%A5%E9%A0%81%E9%9D%A2%E8%A8%AD%E8%A8%88%E8%80%83%E9%87%8F-2b83dbce03cb

沒有留言:

張貼留言