Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Auto login users

Hello

I got the code to work this way

//Note you need to replace "loginInput" with your login input component name.
var login = Appery("loginUsername").val();
//Note you need to replace "passInput" with your password input component name.
var pass = Appery("loginPassword").val();
localStorage.setItem("login", login);
localStorage.setItem("pass", pass);

and it works great.

I still have one problem. The first time you lauch the app you get and alert [object Object] . I am assuming this is done because the localStorage variables login and pass have not been created. But I dont truly know why. Any suggestions?

Thank You
Vinny

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Auto login users

This is the code with the problem

var login = localStorage.getItem("login");
var pass = localStorage.getItem("pass");
if(login)
loginService.execute({data: {username: login, password: pass} });

I need it to skip if localstorage login doesnt exist.

Any Ideas
Vinny

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Auto login users

Forget it. I saved the apk as a newer version and now i cant replicate it.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Auto login users

Hi Vinny,

Thanks for update.

Regards.

Return to “Issues”