The Unloc Work app
The Unloc Work app allows Partner keys to be used by unauthenticated users. Rather, the Unloc Work app authenticates that the key is owned by the partner that invokes the app. The Unloc Work app is invoked from the partner's own native app or web site via automatic app switching. This is similar to how popular payment apps (such as Vipps in Norway) perform in-app payment services.
To invoke the Unloc Work app you need to create an app switch URL. The app switch URL is a signed URL that opens the Unloc Work directly for a specified key.
The app switch URL includes a
returnUrl parameter. The
returnUrl parameter specifies where Unloc Work should redirect the user when the user taps the DONE button in the Unloc Work app. For example, if your app has registered a URL handler for the scheme
foobar, and the
returnUrl parameter is
foobar:// then the user will be taken back to your app when they are done using Unloc Work.
To create an app switch URl, you can either use the
returnUrl parameter in the Create a new Key API or craft an app-switch URL. In either case, tapping the URL on an iPhone or Android phone will bring up the Unloc Work app and make the key available for use. Dismissing the key screen in the Unloc Work app will bring the user back to the originating app, via the
Version 4.2.7 and later of Unloc Work supports automatic unlocking. This means that when the app switch URL is invoked, then Unloc Work will launch, unlock the door, and then immediately return to the calling app without any user intervention. Enable automatic unlocking by adding an extra query parameter to the app switch URL.
For example, if the
appSwitchUrl returned from creating a key is
ai.unloc.pro://use-key?id=fca25600&r=googlechrome://&n=mypartner&s=29d336971d2ec5, then the same
appSwitchUrl can be enabled for automatic unlocking by adding
&auto=true to the url:
Download Unloc Work
The Unloc Work app is globally available for both Android and iPhone.