WKWebView is not loading content in MacOS Authorization Plugin

I am trying to load a WKWebView in my MacOS Authorization Plugin view. All I get is a blank white screen. But when I initiate the login (i.e, pass on the login mechanism to the next system login mechanisms), the webview starts to load. I added WKNavigationDelegate methods to see when they are getting called. All delegate methods (didCommit, didFinish etc..) are getting called after the current login mechanism had passed.

I want to load the WKWebView in my custom login mechanism. What should I do?

To be more specific, the WKWebView starts loading only after builtin:authenticate,privileged mechanism.

Accepted Answer

Actually, I tried to load the webView after running NSApp.runModal(for: window). Apparently, runModal will freeze the other event loops from running except its own.

WKWebView is not loading content in MacOS Authorization Plugin
 
 
Q