How to enable a pop up for authentication for electron?

寵の児 提交于 2019-12-01 20:51:19

What you see on the picture is that Chrome opens a popup for handle authentication event.

However, Electron doesn't make such popup by default, as it stated in the documentation of 'login' event

The default behavior is to cancel all authentications, to override this you should prevent the default behavior with event.preventDefault() and call callback(username, password) with the credentials.

This means, you should handle 'login' event of your webContents manually and open a popup window by yourself or do whatever you want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!