Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

513
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda