How to manage Codeigniter session with Ionic 3 application? - 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: How to manage Codeigniter session with Ionic 3 application? (/showthread.php?tid=71791) |
How to manage Codeigniter session with Ionic 3 application? - amilaperera - 09-25-2018 have developed Codeigniter back-end and I want to use same controllers with Ionic 3 application. Ionic 3 login works perfect with back-end controller and creates session and I store user data in the session variable. When I access another controller via Ionic 3 after login success, it has no any user data in the session. I need to keep session data until it destroy on logout because user data is used in each controller access whether user is logged in or not. Here is my code. Code: //main login function //Checking whether user logged or not Code: public function is_login(){ $this->session->userdata(‘username’); returns null when I access via Ionic 3 but works fine with browser. How can I use PHP backend with ionic 3? Help me out to solve this problem. Thanks in advanced. RE: How to manage Codeigniter session with Ionic 3 application? - dave friend - 09-25-2018 What you describe is usually due to improper session and/or cookie config settings. Show the associated $config values and maybe someone will spot a problem. RE: How to manage Codeigniter session with Ionic 3 application? - ignitedcms - 09-25-2018 Things to check, how is it loading pages, looks all ajax one page, check cors, are you acquiring js from a cdnjs site, if so this might be causing issues. |