Generated when a window within this application requires credentials from the user.
Remarks
When a proxy exists, our default behavior shows an auth dialog, and asks users to enter their username and password.
If you would like to change the default behavior, you can use the 'window-auth-requested' event to override it.
Show customized auth dialog instead of default auth dialog:
// Sample code to create a login window. Users can create their own login pages asyncfunctioncreateAuthUI(identity, loginPageUrl, authInfo) { constwinName = 'my-auth-win-' + Date.now(); consturiUuid = encodeURIComponent(identity.uuid); consturiName = encodeURIComponent(identity.name);
User defined function. For example, showing a single dialog, alerting a support team and so on:
constapp = fin.Application.getCurrentSync(); app.on('window-auth-requested', event=> { if (event.authInfo.isProxy) { // user defined function alert('Do whatever you like'); } });
Generated when a window within this application requires credentials from the user.
Remarks
When a proxy exists, our default behavior shows an auth dialog, and asks users to enter their username and password. If you would like to change the default behavior, you can use the 'window-auth-requested' event to override it.
Show customized auth dialog instead of default auth dialog:
Don't show any auth dialog:
User defined function. For example, showing a single dialog, alerting a support team and so on: