cancel
Showing results for 
Search instead for 
Did you mean: 

Integration of a core php website to existing magento 2 website without asking for login credential.

Integration of a core php website to existing magento 2 website without asking for login credential.

I have a website for pets food made in magento2. now I want to create another website in CodeIgniter for another service like doctors, pets care etc.

I want existing site user to use services of my new CodeIgniter website without asking for login if they are already logged in in Magento site. but if they are not logged in then it will ask them to log in for this new website with the existing Magento website credentials.

Is there any way to do so? actually, I am working in Codeigniter not in Magento and don't know if it's possible to integrate a core site into existing magento2 like this.

3 REPLIES 3

Re: Integration of a core php website to existing magento 2 website without asking for login credent

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

Re: Integration of a core php website to existing magento 2 website without asking for login credent

I also want to use Magento instead of code igniter for a taxi booking website. But I have not found any proper way and solution to do this. Did you find any detailed solution?

Re: Integration of a core php website to existing magento 2 website without asking for login credent

Yes, it’s possible to allow users logged into your Magento 2 site to access your CodeIgniter site without logging in again, using a Single Sign-On (SSO) approach. Similar to how a local taxi near me seamlessly picks you up without needing to re-enter your details, SSO lets users transition smoothly between platforms. If both sites are on the same domain or subdomain, you can share session cookies and read Magento’s session in CodeIgniter. If they are on different domains, you can implement token-based authentication by having Magento generate a secure token when the user is logged in, then pass that token to CodeIgniter to validate and log the user in. You'll need access to Magento’s session handling or API to do this securely.