iOS Push Notifications

We have successfully gotten Android Push tokens working in our environment and have added the iOS project IDs to our privacyIDEA config. We have also setup an APNS key within Firebase to allow us to use Apple’s push notification servers.

However, when attempting to use a push token assigned to an iOS device, the below error occurs.

[2019-10-08 16:04:29,162][11989][139956920170240][WARNING][privacyidea.lib.smsprovider.FirebaseProvider:100] Failed to send message to firebase service: {
  "error": {
    "code": 401,
    "message": "Auth error from APNS or Web Push Service",
    "status": "UNAUTHENTICATED",
    "details": [
      {
        "@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
        "errorCode": "THIRD_PARTY_AUTH_ERROR"
      }
    ]
  }
}

I am assuming this is due to the fact that the AppID utilized by the privacyIDEA Authenticator is not attached to our APNS key in any way. I am in the process of compiling the source of the authenticator with a development provisioning profile under our ADC account to test this but wanted to at least bring this up for discussion in case I’m just doing something incorrect.

As an update, compiling the app with our development certificate and bundle ID allows the push notifications to work.

Thanks for the tips. So push notification does not work with the privacyidea.app form the IOS store?

Hi,
to use the push with the app from the ios store, you need the key for the APNs to configure your firebase project with. If you compile the app with your own developer cert like droo did, you can set up the APNs (and then Firebase) yourself. We are currently looking into whether it is safe to hand out the key or if we need to find another way around this.

Niels thanks for the reply. I tested the push token for IOS and did not work because of the APN settings. Thanks to @droo I know why.