File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ import AdminForthAdapterGoogleOauth2 from '../../adapters/adminforth-oauth-adapt
1010import OpenSignupPlugin from '../../plugins/adminforth-open-signup/index.js' ;
1111import OAuthPlugin from '../../plugins/adminforth-oauth/index.js' ;
1212import KeyValueAdapterRam from '../../adapters/adminforth-key-value-adapter-ram/index.js' ;
13+ import CaptchaAdapterCloudflare from "@adminforth/login-captcha-adapter-cloudflare" ;
14+ import CaptchaPlugin from "@adminforth/login-captcha" ;
15+
1316
1417async function allowedForSuperAdmin ( { adminUser } : { adminUser : AdminUser } ) : Promise < boolean > {
1518 return adminUser . dbUser . role === 'superadmin' ;
@@ -134,6 +137,12 @@ export default {
134137 }
135138 }
136139 ) ,
140+ new CaptchaPlugin ( {
141+ captchaAdapter : new CaptchaAdapterCloudflare ( {
142+ siteKey : `${ process . env . CLOUDFLARE_SITE_KEY } ` , // Replace with your site key
143+ secretKey : `${ process . env . CLOUDFLARE_SECRET_KEY } ` , // Replace with your secret key
144+ } ) ,
145+ } ) ,
137146 new ForeignInlineListPlugin ( {
138147 foreignResourceId : 'cars_sl'
139148 } ) ,
Original file line number Diff line number Diff line change 2727 "@adminforth/image-generation-adapter-openai" : " ^1.0.7" ,
2828 "@adminforth/image-vision-adapter-openai" : " ^1.0.1" ,
2929 "@adminforth/import-export" : " ^1.4.6" ,
30+ "@adminforth/login-captcha" : " ^1.1.7" ,
31+ "@adminforth/login-captcha-adapter-cloudflare" : " ^1.0.16" ,
3032 "@adminforth/rich-editor" : " ^1.6.14" ,
3133 "@adminforth/storage-adapter-amazon-s3" : " ^1.0.11" ,
3234 "@adminforth/text-complete" : " ^1.8.9" ,
You can’t perform that action at this time.
0 commit comments