Custom TKTokenAuthOperation inside the Cryptotokenkit API

Hello,

I recently wanted to change the GUI of the TKTokenSmartCardPINAuthOperation to use my own GUI. from the documentation available on the Apple website nothing tells me that it's forbiden to create your own TKTokenAuthOperation in order to login on a card. [https://developer.apple.com/documentation/cryptotokenkit/tktokenauthoperation]

I thought that making a class inherit the TKTokenAuthOperation where I could create my own Workflow and GUI would help. unfortunatly as soon as we exsit the init() function (and the calling function of a tokenSession(_:beginAuthFor:constraint:)) the operation I was doing( in my case a signature) start all over again, without waiting for the end of the authentication.

I would love to use this solution since the workflow of a signature inside the tokenSession(_:sign:)) function is non blocking, therfore if I want to display my own PIN dialog since the one provoded does not enable facial recognition, or bio template aquisition.

TLDR:

class MyAuth : TKTokenAuthOperation
{
   override init()
   {
     Display_My_PINDialog(completionHandler: { pin in 
        self.finish()
     })
   }
}

does not work.

Replies

I recently wanted to change the GUI of the TKTokenSmartCardPINAuthOperation to use my own GUI.

I don’t think that goal is achievable given the current CTK API. I recommend that you file an enhancement request, making sure to describe your specific requirements in detail.

Please post your bug number, just for the record.

Share and Enjoy

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