Logging user into prestashop from existing website - Core developers - PrestaShop

Jump to content

Photo

Logging user into prestashop from existing website

login web services api integration authentication single sign on sso alternate login

#1

Posted 06 September 2013 - 12:34 PM

petkow

    PrestaShop Newbie

  • Members
  • Pip
  • 1 Active Posts

I know the topic of integrating prestashop into another website with a common login has been discussed before in the forums, but I wanted to revive the discussion and see if there are any new ideas.

 

I have an existing website with its own user database that already has already has all the existing fields that would normally exist in the prestashop user database. A user would arrive to prestashop only through this existing website and only while already being logged onto it. One of the new options for him/her will be something like "Access the Shop". My thoughts are as follows:

 

1. Activate web services in my prestashop

2. Allow my existing website to consult if the user already exists in Prestashop (via the API) or if his/her existing record has any changes

3. Create a new record if the user does not exist or amend it if there are changes. This would occur without the user noticing by just reading data from my existing table and inserting into Prestashop via the API.

4. Log the user onto Prestashop seamlessly (thereby creating a new Prestashop cookie)

5. Disable all forms of access to the Prestashop login and Prestashop User area

6. On future logins I would also have to check if the user is already logged into Prestashop

 

Am I more or less on the right track? After spending a day investigating webservices, and downloading the PHP webservice library and some very useful PHP example files from https://github.com/P...-webservice-lib  I am comfortable with stages 2 and 3. I then perform the login in stage 4 using the email and password from the existing session and sending it via POST to /index.php?controller=authentication

 

Is there an easier way to do all of this such as with a single sign on? Does anybody else have any leads or experience with doing something like this?

 

Thank you very much in advance.

 

p.s. The posts in the forum that I have consulted so far are:

http://www.prestasho...r-is-logged-in/
http://www.prestasho...eloped-website/
http://www.prestasho...m-external-app/

http://www.prestasho...nother-website/


Edited by petkow, 06 September 2013 - 12:50 PM.


#2

Posted 02 April 2014 - 12:11 PM

jleger

    PrestaShop Newbie

  • Members
  • Pip
  • 1 Active Posts

Hi

 

i'm facing the same issue, anyone have somme feedback ?



#3

Posted 28 September 2014 - 12:14 AM

athenasoft

    PrestaShop Newbie

  • Members
  • Pip
  • 2 Active Posts

Hi, this seams to be a unanswered question. Any pointers about how to solve this will be highly appreciated. I've been looking after LDAP or Open Directory modules for PrestaShop, but nothing seam to be available.

Thanks



#4

Posted 29 September 2014 - 10:49 AM

hpar

    PrestaShop Apprentice

  • Members
  • PipPip
  • 83 Active Posts

Hi,

 

 

Is there an easier way to do all of this such as with a single sign on? Does anybody else have any leads or experience with doing something like this?

Yes, I have created a library for that : https://github.com/h...restashopBridge. It works.



#5

Posted 29 September 2014 - 12:32 PM

athenasoft

    PrestaShop Newbie

  • Members
  • Pip
  • 2 Active Posts

Thanks hpar. This is pretty close to what I need. I'll test it ASAP.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cookies help us deliver our services. By using our services, you agree to use our cookies.     Learn more