Skip to content

ElectronApp.on('login') method

ElectronApp › on(‘login’)

Unofficial

Registers a listener for the login event.

Emitted when webContents wants to do basic auth.

Signature:

on(event: "login", listener: (event: ElectronEvent, webContents: ElectronWebContents, authenticationResponseDetails: ElectronAuthenticationResponseDetails, authInfo: ElectronAuthInfo, callback: (username?: string | undefined, password?: string | undefined) => void) => void): this

Parameters:

Parameter Type Description
event "login" The event name.
listener (event: ElectronEvent, webContents: ElectronWebContents, authenticationResponseDetails: ElectronAuthenticationResponseDetails, authInfo: ElectronAuthInfo, callback: (username?: string | undefined, password?: string | undefined) => void) => void The event handler.

Returns: thisThis ElectronApp instance.