You have the option for your TeamSupport Customer Hub to require a user to log in with a username and password. While this works fine for some TeamSupport customers, requiring a password creates a problem if the Customer Hub is being accessed from within another application which already has authentication. Two examples of this would be if you would like to put a link to the Customer Hub from within your application, or from within a portal that you already provide to your customers for your own product.

In these cases, you can use Sing Sign On which allows you to pass generate and pass an authentication token to the Customer Hub which will provide the credentials needed to automatically log the customer into the Customer Hub without further login requirements. You will need to follow the 3 steps outlined on this page.

Step 1: Generating an “authtoken” encrypted value

To generate the authtoken you will need to combine the users email and your GUID along with AES encryption.

Below are examples of creating the encrypted authtoken.

Javascript example: If you do not want the encryption method exposed to users with javascript you can run the code server side and pass just the encrypted string to the front end.

<script src="https://app.teamsupport.com/vcr/1/Js/aes.js"></script>
<script type="text/javascript">
var encrypted = CryptoJS.AES.encrypt(Date.now() + ",{users email}", 
"{GUID}");
</script>

PHP example:

$microtime = microtime();
$comps = explode(' ', $microtime);
// Note: Using a string here to prevent loss of precision
// in case of "overflow" (PHP converts it to a double)
$milliseconds = sprintf('%d%03d', $comps[1], $comps[0] * 1000);
$data_to_encrypt = $milliseconds . ",{users email}";
$passphrase = {GUID};
$salt = openssl_random_pseudo_bytes(8);
$salted = '';
$dx = '';
while (strlen($salted) < 48) {
$dx = md5($dx.$passphrase.$salt, true);
$salted .= $dx;
}
$key = substr($salted, 0, 32);
$iv = substr($salted, 32,16);
$cipher_text = openssl_encrypt($data_to_encrypt, 'aes-256-cbc', $key, true, $iv);
$str = sprintf("Salted__%s%s", $salt, $cipher_text);
$auth_token = base64_encode($str);


Step 2: Generating URL for “Login Button”

You will need to replace [YourCustomerHubURL] – including the brackets – with your Customer Hub Landing Page URL which can be found under Admin->My Portal->Customer Hub->Basic Settings, and replace [encryptedAuthToken] – including the brackets – with your authentication token from Step 1 above. The URL behind your “login button” will look something like this:

https://[YourCustomerHubURL]/sso/[encryptedAuthToken]



Step 3: Giving Customer and Contact access through the settings in the Customer section of TeamSupport

Before anyone can access your Customer Hub, you need to allow Hub access to BOTH the company and the contacts within the company.

A few notes about giving your Customers access:

  • If you are a new customer of TeamSupport and you have not yet imported your Customers into TeamSupport, we advise that you set this value with your import as this will save you a lot of work. For example, if you are pulling your Customers in through our Salesforce Integration, you can mark each new Customer to have Hub access upon import. Likewise, you can include the “Portal access” and “Portal user” fields in your Customer and Contact tables as part of the import.
  • If you would like to give all of your Customers and Contacts access to your Customer Hub, we have a utility to perform this task. This is “all or nothing”, meaning, we can not segment your Customer list in any way with this utility. Please contact TeamSupport with this request.
  • If your Customers are already populated inside of TeamSupport, and you do not wish to give all of your Customers access to the Customer Hub, you may turn on access to each Company/Contact manually. Please keep in mind that you do not need to issue your customer passwords for this method. Click here to learn how to give Hub access manually.
  • By default, customers have access to change their passwords in the Customer Hub. We recommend removing this link to changing their password. You can do this by adding the following html code to your Custom CSS page in the Advanced View Designer for the Customer Hub.
    .change-password{display:none}

Need more help with this?
Customer Support

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.