so when app restarts currentUser becomes null, in this type of situation i silently login user with it’s stored credentials unless a user’s account is created via using a socialAuthenticaion. how can i persists the login without prompting user to login every time app restarts?
A backendless session is identified by user-token. The token is returned when user logs in (using either the classic or the social login). If persistent login is enabled, the token is saved in the client side. The token remains valid for the duration of the session (which is configured in console on the Users > Login screen).
With the social login, you can do 2 things:
- extend the life of the session to the maximum (max int)
or - use native SDK from the social network you use and see if they allow persistent logins.
Regards,
Mark
Hey Man thanks for your rapid response! what’s the limit of session’s life?
maximum integer - 2147483647
they’re in seconds right? Maybe not, milliseconds?
Yes, that’s what the UI says ))
Alright that’s enough, Thanks!