Electron callback can only be called for once
I have a simple electron app that wraps around a web app that prompts for username and password. Problems: 1) When the user inputs the wrong credentials and the authWindow appears again. With the right credentials the second time login does not happen. 2) When the user inputs the wrong credentials twice, the authWindow no longer appears. Any help is appreciated. Here is my code: const { app, BrowserWindow, ipcMain } = require('electron'); app.on("login", (event, webContents, request, authInfo, callback) => { event.preventDefault(); createAuthWindow().then(credentials => { callback(credentials