Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

WebView-Based Authentication in macOS Authorization Plugin

I am developing an Authorization plugin for macOS that should be invoked when a user unlocks their device from the lock screen. Based on advice from the other threads in these forums, I have understood that:

  1. The plugin needs to use SFAuthorizationPluginView
  2. The auth db entries to modify are system.login.screensaver and authenticate

I found the NameAndPassword sample and after making some tweaks to it was able to get it to work from screensaver unlock.

I am trying to add Webview-based authentication to the plugin, but have not had any success. The plugin window's width does not change (though the height does) and only a small portion of the HTML gets rendered. Is Webview-based authentication supported with SFAuthorizationPluginView? Are there any alternatives?

Answered by DTS Engineer in 829662022
I found the NameAndPassword sample and after making some tweaks to it was able to get it to work from screensaver unlock.

If that’s the most advanced thing you’re working from then I’d like you to get in touch privately. Please open a DTS code-level support request to facilitate that. Make sure to reference this DevForums thread so that I understand the context.

I am trying to add Webview-based authentication to the plugin, but have not had any success.

That’s not something we support. Web views are too complex to work reliably in the odd environment in which authorization plug-ins are executed. You’ll need to rethink your plans here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I found the NameAndPassword sample and after making some tweaks to it was able to get it to work from screensaver unlock.

If that’s the most advanced thing you’re working from then I’d like you to get in touch privately. Please open a DTS code-level support request to facilitate that. Make sure to reference this DevForums thread so that I understand the context.

I am trying to add Webview-based authentication to the plugin, but have not had any success.

That’s not something we support. Web views are too complex to work reliably in the odd environment in which authorization plug-ins are executed. You’ll need to rethink your plans here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

WebView-Based Authentication in macOS Authorization Plugin
 
 
Q