fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

Javascript Biometric Module #1379

Closed ichan-mb closed 3 years ago

ichan-mb commented 3 years ago

This adds javascript functionality to access the biometric sensor.

<JavaScript>
    var Auth = require('FuseJS/Biometric');
    var authenticate = function(e) {
        if (Auth.isBiometricSupported()) {
            Auth.authenticate("We need your biometric data to continue").then(function(result) {
                if (result.status) {
                    // auth success
                } else {
                    console.log(result.message);
                }
            });
        }
    }
    module.exports = {
        authenticate
    };
</JavaScript>
<Panel>
    <Button Text="Sign In" Alignment="Center">
        <Clicked Handler="{authenticate}" />
    </Button>
</Panel>

This PR contains: