Login Offline 

  

I'm creating an app for farmers, but sometimes they wont have internet!

My question is, how do i make login with my user without internet!

All i receive is Request failed with an error...

Got be a way to login on the user without internet... Someone pls!

Hi Vinicius,

I think the standard approach is to synchronize on the first login with network, and store locally information on the user.

Then, when offline, upon login, you detect if it is offline and check against the local database the user information.

Not existing network, there is no mechanism to do login other than locally, but I think there is no "official way" on this.

Maybe someone else knows better.

Hope this help,

Cheers,

Eduardo Jauch

Eduardo Jauch wrote:

Hi Vinicius,

I think the standard approach is to synchronize on the first login with network, and store locally information on the user.

Then, when offline, upon login, you detect if it is offline and check against the local database the user information.

Not existing network, there is no mechanism to do login other than locally, but I think there is no "official way" on this.

Maybe someone else knows better.

Hope this help,

Cheers,

Eduardo Jauch

Ok, store locally its ok easy, but how i make the login withou the internet...

Because to do the login i use the Server action named DoLogin and requires net...

Solution

Hi Vinicius,

Yes, but they are called from a Client Action (Login, in the Login screen).
You can verify if it is offline there and in case yes, instead of executing DoLogin (a Server action), perform your own Client Action to do Offline Login 

EDIT: 

Cheers,
Eduardo Jauch

Solution

P.S. But if there is no need to "logout", you can use "Persistent Login", as it is supported offline.

Eduardo Jauch wrote:

P.S. But if there is no need to "logout", you can use "Persistent Login", as it is supported offline.


There is no need to logout....

How this persistent login works?

Hi,

In the login action, inside DoLogin, there is the Remember property. Set it to True (I think it is the default).


When it is true, closing the app don't logout the user.

Cheers


sorry, but what is the inside of dologinoffline ?

I have a need that the application can be accessed via offline mode, with the username and password that already stored from previous online login. But because the next screen has "registered" attribute, it keep redirected back to login screen.