I have created an Ionic application that includes an iframe from a Wordpress website. Here is the code snippet from my home.page.ts file:
import { Component } from '@angular/core';
import { DomSanitizer } from "@angular/platform-browser";
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
public cleanSupportURL: any;
sanitizer: DomSanitizer;
url: string = "https://domain.com.ar";
constructor(sanitizer: DomSanitizer) {
this.sanitizer = sanitizer;
this.cleanSupportURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
this.cleanSupportURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.fb);
}
}
Here is the content of my home.page.html file:
<ion-content>
<ion-content>
<iframe [class]="webPage" [name]="samplePage" scrolling="yes" [src]="cleanSupportURL">
</iframe>
</ion-content>
</ion-content>
Everything works well in the app, except for the login functionality with Facebook and Google. When attempting to log in with Facebook, I encounter the following screen:
The web page at https://m.facebook.com/login.php?sk... could not be loaded due to:
net::ERR_BLOCKED_BY_RESPONSE
Does anyone have an idea on how to resolve this issue? Thank you.