Skip to content

ERRORS

Stable code values on every Authentication rejection. Read them from cordova.tsauth.ERRORS. The native SDK name is platformCode on the same object.

Android reports a finer-grained taxonomy than iOS. code is the subset both platforms share. When a platform error has no mapping, code is the raw platformCode.

User cancellation is the common case. isUserCanceled() matches userCanceled.

Members

MemberValue
NOT_INITIALIZED"notInitialized"
INITIALIZATION_ERROR"initializationError"
UNSUPPORTED"unsupported"
REQUEST_IS_RUNNING"requestIsRunning"
NETWORK_ERROR"networkError"
INTERNAL_ERROR"internalError"
INVALID_ARGS"invalidArgs"
USER_CANCELED"userCanceled"
NOT_REGISTERED"notRegistered"
USER_NOT_FOUND"userNotFound"
NO_CREDENTIALS"noCredentials"
INVALID_DOMAIN"invalidDomain"
BIOMETRICS_NOT_AVAILABLE"biometricsNotAvailable"
BIOMETRICS_NOT_ENROLLED"biometricsNotEnrolled"
BIOMETRICS_LOCKED_OUT"biometricsLockedOut"
PERMISSION_DENIED"permissionDenied"
DEVICE_PIN_NOT_AVAILABLE"devicePinNotAvailable"
INCORRECT_URI_FORMAT"incorrectURIFormat"
DUPLICATE_COMMIT"duplicateCommitRegistration"

Usage

try {
  await cordova.tsauth.registerWebAuthn('alice@example.com');
} catch (e) {
  if (e.code === cordova.tsauth.ERRORS.INVALID_DOMAIN) {
    console.warn(e.platformCode, e.message);
  }
}