Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(secure-storage): add missing function #1626

Merged
merged 2 commits into from
Jun 1, 2017
Merged

fix(secure-storage): add missing function #1626

merged 2 commits into from
Jun 1, 2017

Conversation

danielsogl
Copy link
Owner

fix #1625

@ihadeed
Copy link
Collaborator

ihadeed commented May 31, 2017

Could you please fix the lint issues

@danielsogl
Copy link
Owner Author

@ihadeed done!

@ihadeed ihadeed merged commit 8b9995a into danielsogl:master Jun 1, 2017
@danielsogl danielsogl deleted the patch-29 branch June 1, 2017 10:30
@dexterouschen
Copy link

@danielsogl can you reopen this issue? the newest version of secure storage still haven't solve the inaccessibility of secureDevice(), sure you can access it on SecureStorageObject but this function only matters when the initialization fails, so the Promise rejection should at least include a object with secureDevice() on it. You can probably call it SecureStorageError, that way secureDevice() can be used in the same way as described in the plugin documentation:

https://github.com/Crypho/cordova-plugin-secure-storage#android

var ss;
var _init = function () {
    ss = new cordova.plugins.SecureStorage(
        function () {
            console.log('OK');
        },
        function () {
            navigator.notification.alert(
                'Please enable the screen lock on your device. This app cannot operate securely without it.',
                function () {
                    ss.secureDevice(
                        function () {
                            _init();
                        },
                        function () {
                            _init();
                        }
                    );
                },
                'Screen lock is disabled'
            );
        },
        'my_app');
};
_init();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Secure Storage in Ionic Native missing secureDevice function
3 participants