PHP | How to log in an user in the backoffice (SSO)

Posted over 1 year ago by Julien Pauthier

Post a topic
Julien Pauthier
Julien Pauthier Admin

You can use our API to generate a sign-on link to log in your users from an intranet portal or from a franchisee/partner account's dashboard. Here is a PHP script to do that:

$email = ""; // The user login
$timestamp = time()*1000;
$sessionTimeout = "600000"; // Link validity
$ssoToken = "8a7e65............";

header("Location:" . urlencode($email) . "&ts=" . $timestamp
 . "&mac=" . hash_hmac ("sha256", $email . $timestamp . $sessionTimeout, $ssoToken) . "&errorPage=");

0 Votes


Login or Sign up to post a comment