Contents
TransUnion recommends adding push notifications to your integrations in order to provide a better experience for End Users. We also recommend providing a mechanism to manually check for pending Auth Requests, because push notifications depend on many interrelated systems to work, such as mobile carrier availability and performance in Google’s own infrastructure, and are not guaranteed to reach the device(s).
Read Integrating Push Notifications for Android for Android or Integrating Push Notifications for iOS for iOS.
The recommended approach for setting up Push Notifications is through the Firebase console and Android library dependency through gradle.
Follow the official documents to Set up a Firebase Cloud Messaging client app. Ensure you have the correct dependencies and a google-services.json file included in your application’s app directory.
To begin, the SDK must have the push device token setup. You must have a FirebaseMessagingService
extended service class. Override onNewToken()
and call the appropriate AuthenticatorManager
method.
@Override
public void onNewToken(String newToken) {
super.onNewToken(newToken);
...
AuthenticatorManager.instance.setPushDeviceToken(newToken);
}
To correctly propagate the push notification, we must have the AuthenticatorManager
handle the payload.
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
...
// create and display the notification to the end user here
...
AuthenticatorManager.instance.handlePushPayload(remoteMessage.getData());
}
Note
If you are processing push notifications outside of TruValidate, registering tokens is not required.
If you are managing your own push notifications outside of TransUnion, we must have the AuthenticatorManager
handle the push package.
...
// create and display the notification to the end user here
...
AuthenticatorManager.instance.handleThirdPartyPushPackage(pushPackageString);
Note
In order for push notifications to work properly in a multi-target environment, each product name of each target needs to be unique.
To identify a device and to receive push notifications from the TruValidate Multifactor Authentication platform, you must register for an Apple Push Notification token:
UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
let userNotifications = UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
UIApplication.shared.registerUserNotificationSettings(userNotifications)
You must register the device token with the Authenticator SDK using the didRegisterForRemoteNotificationsWithDeviceToken
function in the AppDelegate
callback.
[[LKCAuthenticatorManager sharedClient] setPushDeviceToken:deviceToken];
LKCAuthenticatorManager.sharedClient().setPushDeviceToken(deviceToken)
Note
If you are processing push notifications outside of TruValidate, registering tokens is not required.
You must obtain an Apple Push Notification Certification before the TruValidate Multifactor Authentication platform can send push notifications to your mobile app. These instructions assume that you have already set up push notifications for your app. To do this:
In order to intercept push notifications, use the didReceiveRemoteNotification
callback in the AppDelegate
.
Pass the userInfo
to the following call and add the requestReceived
observer.
[[LKCAuthenticatorManager sharedClient] handlePushPayload:userInfo];
LKCAuthenticatorManager.sharedClient().handlePushPayload(userInfo)
Note
When the app is launched, push notifications arrive in didReceiveRemoteNotification
. If the app is closed, the push payload is sent to didFinishLaunchingWithOptions
within the launchOptions dictionary.
If you are managing your own push notifications outside of TruValidate, we must have the LKCAuthenticatorManager
shared client handle the push package string.
[[LKCAuthenticatorManager sharedClient] handleThirdPartyPushPackage:@"push_package_string"];
LKCAuthenticatorManager.sharedClient().handleThirdPartyPushPackage("push_package_string")
TransUnion links to user contributed code as a resource to its community. TransUnion does not in any way guarantee or warrant the quality and security of these code bases. User contributed code is supported by the creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any way, please report that link to TransUnion immediately and we will investigate the claim. Submit any issue to TransUnion support at https://transunion.com/support. ×