Hi @shivam_chauhan1
Well i don't think so directly it will work - you need to play with session tricks.
As you mentioned like someone logged in into magento site has to logged in to codeginiter automatically - so you need to work alot with session and tokenization.
Where in someone already login on the Magento site and goes to codeginiter site - then at the same time you need to fetch those login credentials or i would say a accessible session which allows customer to auto-login on the codeginiter site.
You will require a global session or active session on both the site.
Regarding working on this concept - i think you need to work on Magento application as well - to pass the session data or you need to find the session data from the codeginiter site using API or any custom programming script.
Note : this is based on my experience and suggestion - so there may be another option available for the same.
Hope it helps
if issue solved,Click Kudos & Accept as Solution