Bluetooth connection with Authorization Plugin

As of Monterrey 12.3, the authorization plugin is no longer working with the bluetooth. It's merely stating that it's unauthorized for use. I would like to know how I could fix this.

Thanks

I think the problem has something to do with IOBluetoothHIDDriver being depracated. https://developer.apple.com/support/kernel-extensions

Here is the code:

    switch peripheral.state {
    case .unknown:
      Log.i("Bluetooth state is unknown")
      reset()
    case .resetting:
      Log.i("Bluetooth is resetting")
      reset()
    case .unsupported:
      Log.w("Bluetooth is not supported on this device")
      reset()
    case .unauthorized:
      Log.w("Bluetooth permission was not granted") // I keep getting this error. Both from when accessed from lock screen state and from logged out state. 
      reset()
    case .poweredOff:
      Log.i("Bluetooth is powered off")
      reset()
    case .poweredOn:
      Log.i("Bluetooth is ready")
      addServiceIfNeeded()
    @unknown default:
      Log.w("Unknown peripheral state", peripheral.state)
    }
  }
Bluetooth connection with Authorization Plugin
 
 
Q