Support Topics Documentation Slack YouTube Blog

IsValidLogin() handling

Hi,

Having an issue understanding how to handle the case when isValidLogin() returns false.

On my website (we use Backendless JS SDK), user is logged in using ‘stayLoggedIn = true’ flag, and isValidLogin() still often returns false. Shouldn’t the Backendless library renew the token without the need for the user to re-enter the password if stayLoggedIn is set to true? Since documentation does not talk about this, how should I handle this situation for a normal and smooth user experience?

Thanks,
Justinas.

Hello again, @Justinas_Grazulis

Even if the stayLoggedIn flag set to true when the token is expired Backendless wouldn’t renew the user’s token.

Regards, Denys

@Justinas_Grazulis , token expiration may occur under the following circumstances:

  1. When the session expires. Session expiration is configured in console at Users > Login > Enable Session timeout
  2. If multiple logins are enabled. See Users > Login > Enable Multiple Logins.

Regards,
Mark

@mark-piller :

What does this mean precisely? The token expires if multiple logins are enabled? Or does this mean, the first token expires if a second login occurs?
Regards,

Hello @Klaas_Klever,

If you turn on multiple logins, and put 10 simultaneous logins, hhen when 11 guy came, he will get an error