bgmulinari / B1SLayer

A lightweight SAP Business One Service Layer client for .NET
MIT License
136 stars 47 forks source link

Logout is not working #66

Closed ByYogi closed 5 months ago

ByYogi commented 5 months ago

In the screenshot, I logged out but was still able to request B1SLayer image

ByYogi commented 5 months ago

Each request ServiceLayer will check the login status and if it has been more than 30 minutes since the last login, it will automatically call the Login request and save the login cookies. LogoutAsync will call the Logout request and clear the cookie, as well as clear the last login time. So the next time the ServiceLayer checks for more than 30 minutes since the last login, it will automatically login again.

bgmulinari commented 5 months ago

Hi, @ByYogi. That's correct.

B1SLayer has an auto login logic that will perform a login (if you don't have an active session) every time you perform a request. So when you logout and immediately perform another request, a new login request will be made in the background before it.