This is a sample application to demonstrate how to use Haventec Authenticate. This application is NOT intended to be used in a Production environment.
Install NodeJS > v8.0.0
Install Ionic
Install the dependencies within the root folder
npm install
We need to update the API_ENDPOINT and APPLICATION_UUID values in the application.const.ts file.
The API_ENDPOINT value tells this application where your backend server is located.
The APPLICATION_UUID is from the Haventec Cloud Portal. This is created when you add a new Application
Edit the values in
/src/constants/application.const.ts
Start the server
ionic serve
Run with Android
ionic cordova run android
Run with iOS
ionic cordova run ios
This sample application was built to work with Haventec's Authenticate sample server. However you can modify this code to easily work with your own server
The app supports authentication using the user's fingerprint, on supported iOS and Android devices, in addition to PIN. The fingerprint will need to be activated on the device in order to enable this. Please see instructions for the specific device on setting up fingerprint ID scan.
This project is licensed under the MIT License - see the LICENSE.md file for details
Steps to reproduce:
- Run from the project folder the following command in order to build for android
cordova build android --verbose
Error Output
No scripts found for hook "before_compile".
ANDROID_HOME=/Users/oscarsancheziglesias/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
Running command: "/Applications/Android Studio.app/Contents/gradle/gradle-4.4/bin/gradle" -p /Users/oscarsancheziglesias/IdeaProjects/haventec-authenticate-sample-app/platforms/android wrapper -b /Users/oscarsancheziglesias/IdeaProjects/haventec-authenticate-sample-app/platforms/android/wrapper.gradle
(node:78017) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: spawn EACCES
(node:78017) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
➜ haventec-authenticate-sample-app git:(master)
Solution
- Give execution permission to gradle. (Use the right location of gradle at your environment stated in the error above)
sudo chmod +x /Applications/Android\ Studio.app/Contents/gradle/gradle-4.4/bin/gradle