enhance error log

This commit is contained in:
Bowen Wang
2025-10-10 21:55:53 +08:00
parent d478102b30
commit 45664bdb65

View File

@@ -33,7 +33,12 @@ const authorizeUserInWindow = ({ authorizeUrl, callbackUrl, session, additionalH
// Ensure the browser window complies with "SSL/TLS Certificate Verification" preference
window.webContents.on('certificate-error', (event, url, error, certificate, callback) => {
event.preventDefault();
callback(!preferencesUtil.shouldVerifyTls());
const shouldAllow = !preferencesUtil.shouldVerifyTls();
if (!shouldAllow) {
console.error(`Bruno OAuth: SSL Certificate verification failed for ${url}. Error: ${error}`);
console.error('Bruno OAuth: Disable "SSL/TLS Certificate Verification" in settings to proceed with OAuth flows that use invalid certificates.');
}
callback(shouldAllow);
});
const { session: webSession } = window.webContents;