Problem using login function in. NET

Hello! I am using the Backendless API to make an app with user registration and login. But I am having trouble making the login function work properly. After a user has registered and logs in, if I access the app from another device it is already logged in too. Am I using the API wrong?

@Intern_Xchange Could you be so kind to provide us with your app Id.

Regards,
Marina

This is the id: FC3A171F-07C5-D641-FF3D-2E65AA724D00

Hello @Intern_Xchange.
Can you provide a piece of code that reproduces this error?

Regards, Nikita.

public async static Task userLogin(string email, byte[] pass, bool stayedlogin)
{
string ret = “”;
AsyncCallback callback = new AsyncCallback(
user =>
{
ret = “true”;
},
error =>
{
ret = error.FaultCode;
});
Backendless.UserService.Login(email, System.Text.Encoding.UTF8.GetString(pass), callback , stayedlogin);
while (ret == “”)
{
await Task.Delay(25);
}
return ret;

}

There I login user. It doesn’t give me error. I log in from one device and if I access the app from another device it is already logged in too.

On the other device, the parameter stayLoggedIn= false?

On the other device without login you are logged from the first device.

It looks like a bug, now I will try to reproduce the error, wait a moment.
Regards, Nikita

okay

Also i forgot to say that we are using ASP .NET Core.

@Intern_Xchange, I have a news.
I cant reproduce this task.
My steps to reproduce:

1)On the first device, I ran the application with the login:
Backendless.UserService.Login (“hdhdhd@gmail.com”, “123234”, true);
2)On the second, this is:
var t = Backendless.UserService.CurrentUser;
3)Both devices connected to the same application.
4)But on the second application, no unplanned login happened.

Can you please send us a demo project of what you’ve done?

I just created an app with a login.
And I created another application trying to get the current user.
One application is console, the other for Android.

We are trying to create a Web application, running through a browser

We use only one app.

Okay, now I will make one application with the following steps, at startup I will try to get the current user, if it is equal to null, I will log in.

And I’ll run it on two different devices: in the emulator and on a real device.

Will it be okay?

Yes, It is okay.

@Intern_Xchange, again failed to reproduce the error.
Such behavior simply cannot be.
StayLoggedIn saves data to the local storage of the device; you won’t be able to get this data from another device.
Most likely, you have previously logged in on a different device and you had stayLoggedIn = true. This is the reason for this behavior. That is, the login information is already saved on the second device.

Here’s what I think about it
Regards, Nikita.

What type of project you used?

Xamarin project for android