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:

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

Returns: thisThis ElectronApp instance.