diff --git a/package.json b/package.json index a73207b7d..5b41d2a6c 100755 --- a/package.json +++ b/package.json @@ -71,7 +71,6 @@ "mustache": "^3.0.2", "mux.js": "^5.11.0", "ng-circle-progress": "1.5.1", - "ng-recaptcha": "8.0.1", "ng2-ace-editor": "^0.3.9", "ng2-charts": "^2.4.3", "ng2-ckeditor": "1.2.6", diff --git a/src/app/routes/public/public-signup/public-signup.component.ts b/src/app/routes/public/public-signup/public-signup.component.ts index 921d9ce7f..d31178d6a 100644 --- a/src/app/routes/public/public-signup/public-signup.component.ts +++ b/src/app/routes/public/public-signup/public-signup.component.ts @@ -6,7 +6,6 @@ import { LoggerService, ConfigurationsService, NsInstanceConfig } from '@sunbird import { debounceTime, distinctUntilChanged, startWith, map } from 'rxjs/operators' import { environment } from 'src/environments/environment' import { MatSnackBar, MatDialog } from '@angular/material' -import { ReCaptchaV3Service } from 'ng-recaptcha' import { SignupSuccessDialogueComponent } from './signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component' export function forbiddenNamesValidator(optionsArray: any): ValidatorFn { @@ -62,7 +61,7 @@ export class PublicSignupComponent implements OnInit, OnDestroy { confirm = false private subscriptionContact: Subscription | null = null - private recaptchaSubscription!: Subscription + // private recaptchaSubscription!: Subscription constructor( private signupSvc: SignupService, @@ -70,7 +69,6 @@ export class PublicSignupComponent implements OnInit, OnDestroy { private configSvc: ConfigurationsService, private snackBar: MatSnackBar, private dialog: MatDialog, - private recaptchaV3Service: ReCaptchaV3Service ) { this.registrationForm = new FormGroup({ firstname: new FormControl('', [Validators.required, Validators.pattern(this.namePatern)]), @@ -172,9 +170,9 @@ export class PublicSignupComponent implements OnInit, OnDestroy { if (this.subscriptionContact) { this.subscriptionContact.unsubscribe() } - if (this.recaptchaSubscription) { - this.recaptchaSubscription.unsubscribe() - } + // if (this.recaptchaSubscription) { + // this.recaptchaSubscription.unsubscribe() + // } } displayFn = (value: any) => { @@ -187,17 +185,17 @@ export class PublicSignupComponent implements OnInit, OnDestroy { signup() { - this.recaptchaSubscription = this.recaptchaV3Service.execute('importantAction') - .subscribe( - _token => { - // tslint:disable-next-line: no-console - console.log('captcha validation success') - }, - error => { - // tslint:disable-next-line: no-console - console.error('captcha validation error', error) - } - ) + // this.recaptchaSubscription = this.recaptchaV3Service.execute('importantAction') + // .subscribe( + // _token => { + // // tslint:disable-next-line: no-console + // console.log('captcha validation success') + // }, + // error => { + // // tslint:disable-next-line: no-console + // console.error('captcha validation error', error) + // } + // ) const req = { firstName: this.registrationForm.value.firstname || '', diff --git a/src/app/routes/public/public-signup/public-signup.module.ts b/src/app/routes/public/public-signup/public-signup.module.ts index db7d76ed5..434eec299 100644 --- a/src/app/routes/public/public-signup/public-signup.module.ts +++ b/src/app/routes/public/public-signup/public-signup.module.ts @@ -29,9 +29,7 @@ import { PublicSignupComponent } from './public-signup.component' import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { RouterModule } from '@angular/router' import { SignupService } from './signup.service' -import { RECAPTCHA_V3_SITE_KEY, RecaptchaV3Module } from 'ng-recaptcha' import { SignupSuccessDialogueComponent } from './signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component' -import { environment } from 'src/environments/environment' @NgModule({ declarations: [PublicSignupComponent, SignupSuccessDialogueComponent], @@ -63,15 +61,10 @@ import { environment } from 'src/environments/environment' MatButtonToggleModule, MatTabsModule, MatAutocompleteModule, - RecaptchaV3Module, ], exports: [PublicSignupComponent], providers: [ SignupService, - { - provide: RECAPTCHA_V3_SITE_KEY, - useValue: environment.recaptcha.siteKey, - }, ], entryComponents: [SignupSuccessDialogueComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA],