Jump to content

How I can to log in prestashop backoffice from my site?


Recommended Posts

Hello. I have a website in. NET where my users are logged and want you to do automatically login Prestashop backoffice that I have on another server. I use Prestashop 1.5.3.1 version.

 

What I can do?

 

I can call some url passing the email and password? I can create the authentication cookie?

 

Thanks.

Link to comment
Share on other sites

<p>the only way to achieve this is:</p>

<p> </p>

<ol>

<li>accounts in your website must be related to the accounts in your store</li>

<li>when someone log in in your website send POST form request to your store with login credentials</li>

</ol>

 

Link to comment
Share on other sites

When I want to log in to the backoffice, I go to http://xxxxxx.yyyyyy.net/admin1234/ and the url changes to http://xxxxxx.yyyyyy.net/admin1234/index.php?controller=AdminLogin&token=61852452524779537c73ccc3b840cc03&redirect=AdminHome

 

The parameter controller is where to call to make the post

the parameter token, a token is generated not like or what it does

The parameter redirect is where you just redirect

 

I checked the file AdminLoginController.php is in the controllers folder.

 

When you post, calls the postprocess(). Since this function calls processLogin(). This function takes the parameters email and passwd and makes the login.

 

From .NET, sending a POST request to http://www.xxxxxx.yyyyyy.net/AdminLogin/[email protected]&passwd=asdfasdf and/or http://www.xxxxxx.yyyyyy.net/controllers/AdminLogin/[email protected]&passwd=asdfasdf and in both cases, it returns me Error 404

Edited by innovasem (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...