Page 1 of 1

Auto login into Opencart store using parameters passed

Posted: Wed Mar 19, 2014 4:51 pm
by Namitha
Hi,

I have set up an Opencart store which needs to be accessed from a different application. Since the User would have logged into the main application, we do not want him to login again into the Opencart store. Can we auto login to Opencart by using Username parameters passed via an URL?

This is a very urgent requirement. Has anybody worked on something similar? Your help is greatly appreciated.

Regards,
Namitha.

Re: Auto login into Opencart store using parameters passed

Posted: Wed Mar 19, 2014 10:19 pm
by butte
Version? Specifically what other software is supposed to share log-in with OC? Sharing is a bad idea if the other one is a forum or blog, both of those invite attack.

Re: Auto login into Opencart store using parameters passed

Posted: Wed Mar 19, 2014 11:25 pm
by MarketInSG
Namitha wrote:Hi,

I have set up an Opencart store which needs to be accessed from a different application. Since the User would have logged into the main application, we do not want him to login again into the Opencart store. Can we auto login to Opencart by using Username parameters passed via an URL?

This is a very urgent requirement. Has anybody worked on something similar? Your help is greatly appreciated.

Regards,
Namitha.
The easiest way is to copy the index.php file for the admin to a different naming, followed by removing the preaction for login check. That will allow you to access things without logging in.

Re: Auto login into Opencart store using parameters passed

Posted: Wed Mar 19, 2014 11:53 pm
by butte
If you mean admin Users, then "the User would have logged into the main application" and would need to be able to access both admin and his own customer account(s). If you mean customers (in OC Users are admins), then "the User would have logged into the main application" and would need to be able to access only his own customer account(s).

What MarketInSG suggested can be adapted, separately, to each of the two OC index.php files. You might be able to "removing the preaction for login check" without even renaming the index.php files but would have to tinker with that. You would want to be especially careful to prevent unauthorized access to admin.

Re: Auto login into Opencart store using parameters passed

Posted: Wed Sep 17, 2014 3:20 pm
by garvita
Hi Namitha

I am looking for a similar solution. Were you able to find the solution to login from different site.

Re: Auto login into Opencart store using parameters passed

Posted: Sat Oct 13, 2018 8:17 pm
by Parmodya
You can post username from that application to your opencart login page