Is there a way to save the user data on my phone and have a auto login function?
Thx
Is there a way to save the user data on my phone and have a auto login function?
Thx
Hello Kristof,
Please look at this link, it should help: https://getsatisfaction.com/apperyio/...
Thx
I am a newbie so I have no idea where I need to start to link the following things
Kristof,
Could you please specify, do you want autologin in the sense, that the user can enter login/password once and then he will no longer be prompted to login when he open the app again? Or do you mean, to automatically perform autologin when session_token is expired?
I want to create it where peope need to input it once so they don't need to login every time .
Hi Kristof,
In this case you need to implement login page and on "login" button you need to store "login" and "password" in LSV.
Here is code to store it:
pre
//Note you need to replace "loginInput" with your login input component name.
var login = Apperyio("loginInput");
//Note you need to replace "passInput" with your password input component name.
var pass = Apperyio("passInput");
localStorage.setItem("login", login);
localStorage.setItem("pass", pass);
/pre
Then you need on login page "page show" event verify if there these values in LSV and if so - invoke service without user enter this credentials.
Here is code to invoke login service:
pre
var login = localStorage.getItem("login");
var pass = localStorage.getItem("pass");
if(login)
loginService.execute({data: {username: login, password: pass} });
/pre
Regards.
Hello Yurii
the code works great on the App Tester APP "APPERY.io Tester" but doesnt work as an APK on my android galaxy phone. it just says object Object does not exist.
I hit ok then enter username and password then click LogIn. I hit the back button on the phone and get the error or I close the app and reopen it right away and get the error.
Hi Vinny,
You need to debug code and define what exactly line of code gives you this error.
Regards.