Using other platforms authorization for Customer Centre login

A customer asked if it was possible to integrate the Customer Centre with their webshop and let their customers only have to login once. I found https://community.superoffice.com/en/developer/forum/rooms/topic/superoffice-product-api-group/crm-online-application/logging-in-to-customer-centre-online-from-another-website/ but Matthijs is no longer working with us so I can't get his information from him.

Has anyone else done something like this and could share at least the thought behind the solution?

RE: Using other platforms authorization for Customer Centre login

Hi Patrik!

One way of doing this would be to use the "CreateTemporaryKey" method of the Person_Agent:

Person_Agent - CreateTemporaryKey

This method is also available in CRMScript:

NSPerson - CreateTemporaryKey

This will generate a temporary_key, which then can be appended to the URL to Customer Centre like this:  &token=XXXXXXXXXXXXXXXXX


The generated key will be created in TemporaryKey table, and once it has been used a record in login_customer will be created.

The "CreateTemporaryKey" method requires a person_id as a parameter though, so you will need some logic in place to fetch the correct one :) 

 

By: Petter Näslund 27 Sep 2021

RE: Using other platforms authorization for Customer Centre login

The way we usually does it is that the webshop does a restcall with the key (email or whatever) to a crmscript, the crmscript generates the sessionkey and returns a link to the customer center where the user is already logged in, and the webshop simply iframe the customer portal.

We have done it a few other ways as well, with more security with tokens and so forth, as well as building the Customer Center functionality directly in their webshop, but fetching data from SuperOffice through REST

Just let me know if its anything we can help with.


Regards
Pär Pettersson
I-Centrum AB

By: Pär Pettersson 27 Sep 2021

RE: Using other platforms authorization for Customer Centre login

Perfect! Thanks Petter and Pär!

By: Patrik Larsson 27 Sep 2021

RE: Using other platforms authorization for Customer Centre login

I already build passwordless authentication using NextAuth in an app combined with the Customer Center login. So in case the webshop is build with react/next.js let me know and I can show you the solution.

By: Dennis Pabst 29 Sep 2021