Cableguy Expert Licensed User Longtime User May 18, 2017 #1 Hi gurus 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?
Hi gurus 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?
M mindful Active Member Licensed User May 18, 2017 #2 Cableguy said: Hi gurus 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? Click to expand... 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) ... Upvote 0
Cableguy said: Hi gurus 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? Click to expand... 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) ...
stingrae Active Member Licensed User Longtime User Sep 9, 2017 #3 Hi, I've got the same question. Did you end up building a solution for this? any chance you can help with some sample code? Thanks in advance. Upvote 0
Hi, I've got the same question. Did you end up building a solution for this? any chance you can help with some sample code? Thanks in advance.
alwaysbusy Expert Licensed User Longtime User Sep 9, 2017 #4 Code: 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. Upvote 0
Code: 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.