Where to use backendless is Valid Login Method?

Hello, I have a login Activity, i am using “UserTokenStorageFactory. instance().getStorage().get();” to check if login is already available then skip the login Activity, but i came across a section titled “Validating User Login” in your docs, exactly in this Page
https://backendless.com/docs/android/users_login.html
, i dont know what is the difference between Checking userToken with the method i used above and with this isValidLogin() method?

Hello @Mohammed_Abdalla

UserTokenStorageFactory.instance().getStorage().get(); - just returns stored user-token

while isValidLogin() validates the token on the server

there is might be a case when a device has a token but it’s already invalidated

to be sure the token is still valid I recommend you to use isValidLogin()

Regards, Vlad

so, this userToken is like a session?

yes, the "user-token" value identifies the user session initiated by the Login operation.

thanks