Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

519
Views
electron: google 403 We're sorry, but you do not have access to this page. That’s all we know

I'm developing an electron application. When I load the google login page using iframe, I get an error: '403. That’s an error. We're sorry, but you do not have access to this page. That’s all we know.'

How can I skip this error and get the google login page?

Q: Why not use an electron window to load the google login page?

A: It's true that using an electron window to load the google login page doesn't have any errors! But electron window will consume more memory!

Please help me!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Display external web content in an isolated frame and process.

Process: Renderer This class is not exported from the 'electron' module. It is only available as a return value of other methods in the Electron API.

Use the webview tag to embed 'guest' content (such as web pages) in your Electron app. The guest content is contained within the webview container. An embedded page within your app controls how the guest content is laid out and rendered.

Unlike an iframe, the webview runs in a separate process than your app. It doesn't have the same permissions as your web page and all interactions between your app and embedded content will be asynchronous. This keeps your app safe from embedded content. Note: Most methods called on the webview from the host page require a synchronous call to the main process.

Reference

if you are using iframe for google sign you will get a content security policy (CSP) error A result like this

enter image description here

<iframe style="display: flex ;height: 1000px" width="100%" height="100%"
        src="https://accounts.google.com/signin/v2/identifier?service=mail&passive=1209600&osid=1&continue=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F&followup=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F&emr=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin"></iframe>

Solution:

Electron already introduced a webview tag

So The result may like this

enter image description here

    <webview style="
height: 500px;display: flex"  src="https://accounts.google.com/signin/v2/identifier?service=mail&passive=1209600&osid=1&continue=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F&followup=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F&emr=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin"  ></webview>

NB:

You must add the webPreferences property in Browserwindow and the webview tag must be true otherwise the view tag will be hidden. The default webview tag is false .like this

enter image description here

So you must add like this

 function createWindow() {
    win = new BrowserWindow({width: 800, height: 600, webPreferences: {webviewTag: true}})
    win.loadURL(url.format({
        pathname: path.join(__dirname, 'index.html'),
        protocol: 'file:',
        slashes: true
    }))
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!