How to use the `Event: 'login' event in electron?


How can I use the Event: 'login' event in electron?

I would like some help understanding how the Event: 'login' feature in Electron 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({
//This is where I'm confused
app.on('login', (event, webContents, request, authInfo, callback) => {
  callback('my_username', 'my_password');
//How to implement autofill to