Bluetooth connection via authPlugin

Hi Team,



I am developing a sample authPluggin which should connect to a mobile app via bluetooth connection,


So here are the scenario



  1. Authplugin with Bluetooth connection shoould work on lockscreen+login



I have created mechanism- prepared:privillaged, main, clean:Privilaged

Calling corebluetoothmanager initiation at the time of prepared:privilaged mechanism

I have to add my auth plugin’s mechanism before loginwindow:success mechanism



<array> <string>builtin:prelogin</string> <string>builtin:policy-banner</string> <string>loginwindow:login</string> <string>builtin:login-begin</string> <string>builtin:reset-password,privileged</string> <string>loginwindow:FDESupport,privileged</string> <string>builtin:forward-login,privileged</string> <string>builtin:auto-login,privileged</string> <string>builtin:authenticate,privileged</string> <string>PKINITMechanism:auth,privileged</string> <string>builtin:login-success</string> <string>loginwindow:success</string> <string>HomeDirMechanism:login,privileged</string> <string>HomeDirMechanism:status</string> <string>MCXMechanism:login</string> <string>CryptoTokenKit:login</string> <string>loginwindow:done</string> </array>

But I always gets unauthorized = 3, from power state of bluetooth



Note: With App, bluetooth connection is working fine, Its giving error with authPlugin

How to achieve my ultimate goal, is this the right way?

There was no edit option, so I am adding mechanism array here in structured form

<array>
		<string>builtin:prelogin</string>
		<string>builtin:policy-banner</string>
		<string>loginwindow:login</string>
		<string>builtin:login-begin</string>
		<string>builtin:reset-password,privileged</string>
		<string>loginwindow:FDESupport,privileged</string>
		<string>builtin:forward-login,privileged</string>
		<string>builtin:auto-login,privileged</string>
		<string>builtin:authenticate,privileged</string>
		<string>PKINITMechanism:auth,privileged</string>
		<string>builtin:login-success</string>
		<string>loginwindow:success</string>
		<string>HomeDirMechanism:login,privileged</string>
		<string>HomeDirMechanism:status</string>
		<string>MCXMechanism:login</string>
		<string>CryptoTokenKit:login</string>
		<string>loginwindow:done</string>
	</array>

I am developing a sample authPluggin which should connect to a mobile app via bluetooth connection,

AFAIK that’s not possible, at least not on recent systems. Recently Core Bluetooth added a TCC privilege, that is, System Settings > Privacy & Security > Bluetooth. It’s not possible to grant that privilege to code running in a pre-login context.

Share and Enjoy

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

Bluetooth connection via authPlugin
 
 
Q