Guides - TOKEN - Login (frontend)
TOKEN - Login (frontend)
If you already have a login on your website, e.g. in the form of an Intranet, you can with TOKEN-Log avoid that your customers/users must log in double. The Token-login is found and activated under advanced settings. The feature works by your system calling up the system via secure connection (https: //), from an approved IP, with information about the user you would like to log in. Depending on your wishes, you can adjust the following:
The following is an example of the use of TOKEN-Log, written in PHP as GET.
|
$tokenLoginUrlAdd = "";
if (logic for user is logged in here, eg. session check){
$tokenUrl = "https://app.geckobooking.com/site/token.php?do=tokenLogin&tk=[INSERT_TOKENKEY_1_HERE]&tk2=[INSERT_TOKENKEY_2_HERE]&id=[INSERT_AGREEMENT_NUMBER_HERE]";
$tokenUrl .= "&CustomerNumber=".urlencode($MyLocalCustomerNumber);
$tokenUrl .= "&CustomerName=".urlencode($MyLocalCustomerName);
$tokenUrl .= "&CustomerAddress=".urlencode($MyLocalCustomerAddress);
$tokenUrl .= "&CustomerPostalCode=".urlencode($MyLocalCustomerPostalCode);
$tokenUrl .= "&CustomerCity=".urlencode($CustomerCity);
$tokenUrl .= "&CustomerEmail=".urlencode($MyLocalCustomerEmail);
$tokenUrl .= "&CustomerTelephone=".urlencode($MyLocalCustomerPhone);
$tokenUrl .= "&CustomerMobile=".urlencode($MyLocalCustomerMobile);
$tokenUrl .= "&CustomerSSN=".urlencode($MyLocalCustomerSocialSecurityNumber);
$result = file_get_contents($tokenUrl);
if ($result != "false"){
$tokenLoginUrlAdd = "&token=".$result;
}
}
echo "<script type="text/javascript" src="https://app.geckobooking.com/site/iframe.js?icCode=[INSERT_ICCODE_HERE]".$tokenLoginUrlAdd.""></script>";
Example using POST vars and cUrl, and thus also makes it possible to transmit information with the BEF spaces. Using POST is recommended, as it can handle longer text strings. |
0