Authenticate Class
This is trigger action for taking biometric authentication. Both iOS and Android is using Fingerprint/Touch ID or Face Recognition/Face ID sensor depending on what sensor are available on the device.
You need to add a reference to "Fuse.Auth"
in your project file to use this feature.
Example
The following example shows how to use it:
<JavaScript>
var Observable = require('FuseJS/Observable');
var status = Observable();
var statusMessage = Observable();
module.exports = {
status,
statusMessage
resultHandler: function(data) {
status.value = data.result; // bool value indicating whether true value when it succeed or false value if it failed
statusMessage.value = data.message;
}
};
</JavaScript>
<Panel>
<Button Text="Sign In" Alignment="Center">
<Clicked>
<Authenticate PromptMessage="We need your biometric data for Sign In" Handler="{resultHandler}" />
</Clicked>
</Button>
</Panel>
When Using FaceID on iOS, it is mandatory to add description about why you need authentication using FaceID. You can add the description by adding this config on your unoproj
file
"iOS": {
"PList": {
"NSFaceIDUsageDescription": "Require access to FaceID for authenticating"
}
}
Location
- Namespace
- Fuse
- Package
- Fuse.Auth 2.9.1
Interface of Authenticate
Handler : AuthEventHandler (object, AuthArgs) ux
Optionally specifies a handler that will be called when this trigger is pulsed.
PromptMessage : string ux
String message to inform user on why you need biometric data. This message only applicable for fingerprint scan
Inherited from TriggerAction
AtProgress : float ux
Delay : float ux
The number of seconds after the start of the trigger that the action should be performed.
Direction : TriggerWhen ux
IsActive : bool ux
IsProgressTriggered : bool uno
OnUnrooted uno
Perform(Node) uno
PerformFromNode(Node) uno
ProgressWhen(float) : float uno
SourceFileName : string ux
hide
SourceLineNumber : int ux
hide
TargetNode : Node ux
Unroot uno
When : TriggerWhen ux
Inherited from PropertyObject
AddPropertyListener(IPropertyListener) uno
OnPropertyChanged(Selector, IPropertyListener) uno
OnPropertyChanged(Selector) uno
RemovePropertyListener(IPropertyListener) uno
Inherited from object
Equals(object) : bool uno
GetHashCode : int uno
GetType : Type uno
ToString : string uno
Attached UX Attributes
GlobalKey (attached by Resource) : string ux
Implemented Interfaces
ISourceLocation uno
hide