Offline Authentication
SDK for Android
HYPR SDK for Android allows you to authenticate without a network connection by using the authenticateOfflineAppProfile
method in HyprApiActionAdapter
.
To implement offline authentication, your app should first check if the mobile device has internet access to determine the appropriate method:
-
Call
authenticateAppProfile
if there’s a network connection -
Call
authenticateOfflineAppProfile
if there isn't a network connection
For seamless integration into existing apps, the authenticateOfflineAppProfile
method takes the same parameters as the standard authenticateAppProfile
method:
public static void authenticateOfflineAppProfile(@NonNull android.app.Activity activity,
@NonNull java.lang.String appProfileDbId)
Implementation Notes
-
The offline authentication process uses cached data from the last successful online authentication, so the app must first complete a FIDO registration and then a successful FIDO authentication
-
The cache is associated with an individual user account and is updated every time a new FIDO authentication occurs
-
Offline authentication should only be used if your app isn’t managing multiple users in an App Profile
SDK for iOS
HYPR SDK for iOS allows authentication without a network connection by using the authenticateOfflineUser
public method in HYPRUserAgent
.
To implement offline authentication, your app should first check if the mobile device has Internet access to determine the appropriate method:
-
Call
authenticateUser
if there's a network connection -
Call
authenticateOfflineUser
if there isn't a network connection
For seamless integration into existing apps, the authenticateOfflineUser
method takes the same parameters as the standard authenticateUser
method:
HYPRUserAgent.sharedInstance().authenticateOfflineUser(userAccount, action: policyName, completion: completion)
Implementation Notes
The offline authentication process uses cached data from the last successful online authentication, so the app must first complete a FIDO registration and then a successful FIDO authentication.
The cache is associated with an individual user account and is updated every time a new FIDO authentication occurs.
If there is no cached authentication available, the authenticateOfflineUser
method returns an error (109013).