Callback can only be called once app.on('login')

I have a Class that creates a new electron window that loads some websites URL. I want to be able to use a proxy to access that website, but whenever I create more than once instance of that Class I get the error “callback can only be called once” and my app then crashes.

Any thoughts?

      app.on('login', (event, webContents, details, authInfo, callback) => {

       if(authInfo.isProxy) { callback("user", "password") }