Page 1 of 1

Is it possible to clear all variables and refresh everything when a user signs out.

Posted: Tue Jul 29, 2014 9:49 pm
by Mike6979865

The problem I'm facing is when the user logout, and another user signs in, the local storage variables and the fields are not cleared in all pages. Is there a way to reload application or clear everything when a user logs out?

Thank you so much! I'm almost done with my application.


Is it possible to clear all variables and refresh everything when a user signs out.

Posted: Wed Jul 30, 2014 3:38 am
by Yurii Orishchuk

Hi Mike,

You can clear all LSVs with following JS code:

pre

localStorage.clear();

/pre

Then you can reload start page with following code:

pre

//Note you should replace "Screen20" with page name you need to reload.
Apperyio.navigateTo("Screen20", {reloadPage: true, transition: 'none'})

/pre

Regards.


Is it possible to clear all variables and refresh everything when a user signs out.

Posted: Wed Jul 30, 2014 3:30 pm
by Mike6979865

Perfect! Thank you,