Mac OS X Built in authentication dialog

Hello all. Does anyone know if there’s a way of forcing the built in Mac OS X authentication dialog to appear - I don’t want to execute any shell scripts or call an app - this is merely to get the user to authenticate within the app to reveal some information. I could make my own, just wondered if it was possible via a declare. (I’ve got MBS plug-ins, but I can’t find a way to force the auth dialog to appear). Any help, as always, greatly appreciated. Thanks.

Yes. There is Apple API for this, Looks like it should be possible with declares or MBS,but I have not experimented with it so I can not speak from experience.

Please check AuthorizationMBS and LAContextMBS classes in MBS Xojo Plugins.

Wouldn’t it be easier to put a special key in the keychain and then just request that key when necessary? That way the user would be given the ability to choose Allow or Always Allow.


Hi Greg… it’s to display info that requires immediate and forced authentication (sensitive etc). Thankfully, LAContextMBS did the trick in this instance. Thanks @Christian_Schmitz, @Greg_O_Lone

1 Like