Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save user credentials in my cordova app

How do i store app's password in my mobile?I want to store my mobile app's password.i want stay logged in even i close the app. if i reopen the app home page must be opened.I must not be asked to login..I am using Apache cordova as my development platform.I have tried that using cordova secure storage plugin..but that is of no use.

Any help is appreciated..

like image 222
shama Avatar asked Dec 17 '25 13:12

shama


1 Answers

i get the solution i tried local storage its work

i tried like this to save user credentials

                   `window.localStorage.setItem("key", username);
                    var keyname = window.localStorage.key(0);
                    window.localStorage.setItem("key2", password);
                    var keyname2 = window.localStorage.key(0);`

and to get the saved credentials

        var username = window.localStorage.getItem("key");
        var password = window.localStorage.getItem("key2");
like image 154
shama Avatar answered Dec 19 '25 07:12

shama



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!