Issue with User StayLoggedIn

I created a ticket before and it was said “Not Reproducible”. Now the same issue which should be much easier to reproduce.

  1. Login via Google+ with the below code.


Backendless.UserService.loginWithGooglePlus({email:"email"},"email",new Backendless.Async(loginOk, loginFail),null,true);
  1. User remains login for 1 or 2 days roughly as required due to the StayLoggedIn parameter value of true.

  2. Next day when I try to login, no remote calls happens as user details fail with the below message.



Uncaught (in promise) Object {code: 3064, message: "Not existing user token. Relogin user to update your user token", statusCode: 400}
  1. The API is supposed to login successfully or force user to login, but not this making the app calls fail.

  2. App works normally if I forcefully logout the user once.

If Backendless.UserService.isValidLogin() should be used to overcome this, where would that be called? Ideally that logic should be handled by the social login methods.

Please advice.

Hello Purusothaman Ramanujam,
We have assigned developer to manage this issue.
Regards, Artur.

Hi,

you should make a logout before login again.

Stanislav

I guess the issue was not understood properly.

It does not make sense to use logout in auto-signin mode. Can you please explain how does “stayLoggedIn” works? Why “logout” should be forced before login when there will be no actual login if the cookie is valid?

Sorry, if any of my understanding is wrong.