I have went through the very lacking documentation of the WebCookieManager and I can’t make heads or tails of how it is supposed to work. I have never used cookies before so I am unsure where to start.
What I am trying to do is simply create a cookie and set the username of my logged in user to the cookie with a timeout of 30 mins (1800000 ms if I remember right). Then web the main page is opened if the cookie exists and isn’t timedout, then show a different page instead of the login. Upon clicking the logout button remove the cookie.
Here is what I have tried and where:
App > Opening Event
If WebCookieManager.Count > 0 Then
Session.LoggedIn = True
Session.UserName = WebCookieManager.Value("user")
Var main As New MainPage
main.Show
End If
Login Page > Login Button
WebCookieManager.Set("user", 1800000, "URL.COM", "", False, SameSiteStrength As WebCookieManager.SameSiteStrengths = WebCookieManager.SameSiteStrengths.Off) = Session.UserName
Logout Button
UserName = ""
LoggedIn = False
WebCookieManager.Remove("user", "URL.COM", "")
CurrentPage.Close
ShowLoginPage
Help?