I would like some help understanding how the Event: 'login'
feature in Electron Framework works. Is it the low level implementation of the Password Autofill/Remember Password feature common in browsers? I would like to use this to autofill a password in a webpage's login flow e.g.
const electron = require('electron')
const {app,BrowserWindow} = electron
app.on('ready', ()=>{
let win = new BrowserWindow({
width:800,
height:600
})
//This is where I'm confused
app.on('login', (event, webContents, request, authInfo, callback) => {
event.preventDefault();
callback('my_username', 'my_password');
});
//How to implement autofill to https://accounts.google.com?
win.loadURL('https://accounts.google.com')
});
Here is the link to the specification in their docs
It's not used for autofilling, it's used for basic auth. When you get those annoying browser prompts for user and password.
How to display HTTP 401 basic authentication dialog
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With