MacOS: Custom Login Interface

Hello Quinn “The Eskimo!”,

I am trying to customize the mac os login screen. The initial thing I want to do is to add a link or a button on login screen, tapping which should open a web page.

As suggested by you on different forums, I opened a DTS ticket and received the starter project for the same. Now the problem is, the starter project is crashing with following log,

arguments:

mechanism -1 will get arguments

mechanism 2 will get arguments

mechanism -1 did get arguments

none

mechanism -1 will get LAContext

mechanism 2 will get LA context

QAuthHostSimulator/QAuthHostEngineCallbackHelper.swift:144: Fatal error

Could you please help me resolve this issue. Thanks.

Answered by DTS Engineer in 795737022

The trap in my auth host simulator is a red herring. Yes, that code is brittle. If you want to investigate the failure, you have the code and there’s nothing stopping you from debugging it yourself. However, that trap orthogonal to the main issue that you’ve raised here.

Regarding your main issue, you wrote:

The initial thing I want to do is to add a link or a button on login screen, tapping which should open a web page.

That’s not going to work. Authorisation plug-ins run in a very tightly controlled environment and there’s no way to display a web page in that environment. I specifically call that out in the code’s read me:

Specifically, don’t use a web view in your GUI authorization plug-ins. That means both the WKWebView and the legacy WebView. Web views are too complex to work reliably in the odd environment in which authorization plug-ins are executed.


During our initial conversation I made it clear that’s it’s vital that you read all the read me documents that come with that code. Again, I’m quoting myself here:

[This code] embodies the experience I’ve built up helping many authorisation plug-in developers over the years. I expect you’ll find the code helpful, but the most critical part is the various read me documents. These list many the weird edge cases you’re likely to encounter.

Please read those documents. That’ll save us both a bunch of time.

Share and Enjoy

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

The trap in my auth host simulator is a red herring. Yes, that code is brittle. If you want to investigate the failure, you have the code and there’s nothing stopping you from debugging it yourself. However, that trap orthogonal to the main issue that you’ve raised here.

Regarding your main issue, you wrote:

The initial thing I want to do is to add a link or a button on login screen, tapping which should open a web page.

That’s not going to work. Authorisation plug-ins run in a very tightly controlled environment and there’s no way to display a web page in that environment. I specifically call that out in the code’s read me:

Specifically, don’t use a web view in your GUI authorization plug-ins. That means both the WKWebView and the legacy WebView. Web views are too complex to work reliably in the odd environment in which authorization plug-ins are executed.


During our initial conversation I made it clear that’s it’s vital that you read all the read me documents that come with that code. Again, I’m quoting myself here:

[This code] embodies the experience I’ve built up helping many authorisation plug-in developers over the years. I expect you’ll find the code helpful, but the most critical part is the various read me documents. These list many the weird edge cases you’re likely to encounter.

Please read those documents. That’ll save us both a bunch of time.

Share and Enjoy

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

MacOS: Custom Login Interface
 
 
Q