File tree Expand file tree Collapse file tree
src/app/core/google-recaptcha Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,13 +75,20 @@ export abstract class GoogleRecaptchaBaseComponent {
7575 ) ;
7676 }
7777
78+ /**
79+ * The captcha cookie name to check for consent in the klaro-anonymous cookie.
80+ * Subclasses can override this to use a different consent key
81+ * (e.g. CAPTCHA_REGISTRATION_NAME for the registration form).
82+ */
83+ protected captchaCookieName : string = CAPTCHA_FEEDBACK_NAME ;
84+
7885 /**
7986 * Return true if the user has accepted the required cookies for reCaptcha
8087 */
8188 isRecaptchaCookieAccepted ( ) : boolean {
82- const orejimeAnonymousCookie = this . cookieService . get ( 'orejime -anonymous' ) ;
83- return isNotEmpty ( orejimeAnonymousCookie )
84- ? orejimeAnonymousCookie [ CAPTCHA_FEEDBACK_NAME ]
89+ const klaroAnonymousCookie = this . cookieService . get ( 'klaro -anonymous' ) ;
90+ return isNotEmpty ( klaroAnonymousCookie )
91+ ? klaroAnonymousCookie [ this . captchaCookieName ]
8592 : false ;
8693 }
8794
You can’t perform that action at this time.
0 commit comments