![]() |
Suitabe tokens for autologin? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Suitabe tokens for autologin? (/showthread.php?tid=65808) |
Suitabe tokens for autologin? - wolfgang1983 - 07-27-2016 I have a function below which creates / inserts the customers autologin information How ever I am not sure if the tokens and unique_tokens secure enough. There is no personal information set in the cookie just tokens Should I improve the tokens what would you suggest for tokens? PHP Code: public function create_autologin($customer_id) RE: Suitabe tokens for autologin? - InsiteFX - 07-27-2016 This is how I do it there may be better ways not sure. PHP Code: /** RE: Suitabe tokens for autologin? - CallHimX - 07-27-2016 In the end, nothing is secure enough to prevent all attacks, if there someone exist. If you login your user with a "Remember-Token", the token should be completely random (obviously 100% unique), nothing related to the user. So the possible attacker has to trial and error thousands of random tokens to get access to an account, whats nearly impossible. But in case the attacker has access to the machine of your user, in any way you want, a Trojan maybe, he can read out the cookie data and no master-unhackable-super-token can prevent that the attacker is getting into this account. RE: Suitabe tokens for autologin? - wolfgang1983 - 07-27-2016 (07-27-2016, 03:31 AM)InsiteFX Wrote: This is how I do it there may be better ways not sure. Thanks for the code with play around with it see how i go. |