TouchID authentication inside Siri Intent Extension


I have an Intent Extension with the View category that is working pretty good for showing an app info.

Now I need to enable TouchID for security reasons, so the user needs to authenticate before requesting the info.

I tried this:

func handle(intent: GetSaldoIntent, completion: @escaping (GetSaldoIntentResponse) -> Void) {

    let myContext = LAContext()

    localizedReason: "Unlock to see the info",
    reply: { [unowned self] (success, error) -> Void in
        if( success ) {
            completion(GetSaldoIntentResponse.success(saldo: String(self.paymentProvider.balance)))
        completion(GetSaldoIntentResponse(code: .failureRequiringAppLaunch, userActivity: nil))

But the TouchID dialog closes the Siri screen and then the conversation ends:


Is there a way to request for TouchId validation inside an Intent Extension?

I know PKPayment do something similar, but this isn’t a transaction so I can’t use ApplePay.

Source: Ios

Categorised as ios, sirikit, sirishortcuts, swift


Siri already supports the authorisation, you just need to let Siri know that your intent requires authorisation rather implementing authorisation yourself. Hope that helps you:

Elyse Yundt

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us