Skip to content

Validates if a device is compromised, checking if it is rooted/jailbroken and doesn't have a pin, pattern, or password set. If the device is compromise a message is shown to the user and the app exits.

License

Notifications You must be signed in to change notification settings

gnbm/cordova-secure-device

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-secure-device

When the plugin initializes it validates if the device is compromised by validating if it is rooted or jailbroken, and if a pin, pattern, or password is set. If the device is compromised the webview is removed and an alert message is shown. Upon closing the dialog the app exits.

The plugin does not expose any javascript interface, the validation is done when the plugin initializes.

OutSystems Experts Changes

Forked version that removes i18n and adds the ability to customize the messages shown depending on wether the device is rooted/jailbroken or no lock screen is set with pattern/pin.

Customizing warning messages

The following preferences can be used to customize each message:

  • SecurePluginRootedDeviceString: Sets the custom message that appears when the device is rooted/jailbroken. Defaults to: This application does not run on a device that is rooted.
  • SecurePluginNoLockSafetyString: Sets the custom message that appears when the device doesn't have either a PIN or Pattern to unlock it. Defaults to: This application does not run on a device that does not have a passcode set.
  • SecurePluginDialogCloseLabel: Sets the label of the button on the dialog. Defaults to "Close".

On your application config.xml file set one, or all, of the following preferences:

<preference name="SecurePluginRootedDeviceString" value="Rooted device..."/>
<preference name="SecurePluginNoLockSafetyString" value="No Unlock PIN/Pattern is set."/>
<preference name="SecurePluginDialogCloseLabel" value="CLOSE NOW"/>

License

Copyright 2016 André Vieira

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Validates if a device is compromised, checking if it is rooted/jailbroken and doesn't have a pin, pattern, or password set. If the device is compromise a message is shown to the user and the app exits.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 75.5%
  • Java 24.0%
  • JavaScript 0.5%