Skip to content

Commit 5b29591

Browse files
committed
WinForms/WPF/OffScreen - Set disable-chrome-login-prompt command line arg by default
- GetAuthCredentials won't be called otherwise, those wishing to use the Chrome password prompt can remove the command line arg at runtime. Resolves #4830
1 parent 6b682d6 commit 5b29591

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

CefSharp.OffScreen/CefSettings.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ public CefSettings() : base()
2121
//For OffScreen it doesn't make much sense to enable audio by default, so we disable it.
2222
//this can be removed in user code if required
2323
CefCommandLineArgs.Add("mute-audio");
24+
25+
// CEF doesn't call GetAuthCredentials unless
26+
// the Chrome login prompt is disabled
27+
// https://github.com/chromiumembedded/cef/issues/3603
28+
CefCommandLineArgs.Add("disable-chrome-login-prompt");
2429
}
2530

2631
/// <summary>

CefSharp.WinForms/CefSettings.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ public class CefSettings : CefSettingsBase
1616
public CefSettings() : base()
1717
{
1818
ChromeRuntime = true;
19+
20+
// CEF doesn't call GetAuthCredentials unless
21+
// the Chrome login prompt is disabled
22+
// https://github.com/chromiumembedded/cef/issues/3603
23+
CefCommandLineArgs.Add("disable-chrome-login-prompt");
1924
}
2025
}
2126
}

CefSharp.Wpf/CefSettings.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ public CefSettings() : base()
2222
//With OSR rendering it's fairly common for this to improve scrolling performace
2323
//https://peter.sh/experiments/chromium-command-line-switches/#disable-threaded-scrolling
2424
//CefCommandLineArgs.Add("disable-threaded-scrolling");
25+
26+
// CEF doesn't call GetAuthCredentials unless
27+
// the Chrome login prompt is disabled
28+
// https://github.com/chromiumembedded/cef/issues/3603
29+
CefCommandLineArgs.Add("disable-chrome-login-prompt");
2530
}
2631
}
2732
}

0 commit comments

Comments
 (0)