In my ABM webapp, I have a register/login DataBase driven functionality. I would like to provide my users a "remember me" feature... but I have no clue how to go about it.
Should I retrieve user IP address and save it on the database?
In my ABM webapp, I have a register/login DataBase driven functionality. I would like to provide my users a "remember me" feature... but I have no clue how to go about it.
Should I retrieve user IP address and save it on the database?
You should use cookies to store that the user is authed (best to issue a toked/id that you pair with your logged user and verifity it) or use the session attributes to store that the user has logged in successfully. By using a cookie you can set an expire date for that cookie and by using session attributes they will be cleared if the session expires or the server is restarted ....
You can check the abmaterial demo project as it uses session attributes (i am not at the pc right now but it was something like NeedsAuthorization) ...
Page.CookieSet("test", "testvalue", "expires: '01/01/2017'") ' set the cookie
Log(Page.CookieGet("test")) ' get the cookie
Page.CookieExpire("test", "") ' remove the cookie
Make sure you set/get your Cookie AFTER ABMPageId = ABM.GetPageID(page, Name,ws)
If you do it BEFORE, the websocket is not attached to the page yet and will skip the command
As for the session, see the source code of the Feedback App.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.