iFrame Integration with Qflow
If you're using Qflow's Enterprise API setup, it's really easy to immediately take advantage of Qflow's whitelabel check-in portal. Your customers are presented with the ability to edit events, add guests and see statistics all in your branded solution and more importantly all within the confines of your own event / ticketing portal.
Once you've logged in to your enterprise account from the Welcome email you've recieved, you can see your enterprise PIN. In this example lets call your PIN 123.
As well as an enterprise PIN, you have a key which is unique to your enterprise, this key let's access your user's account on their behalf and should be kept completely secret. If you wish to use the iFrame integration method you should contact us for this key. In this example your KEY will be hfdg8AZgkKCQcNCgwOBAYIBa.
So to recap, we've already got access to a PIN and a KEY.
PIN: 123
KEY: hfdg8AZgkKCQcNCgwOBAYIBa
Next you'll need to know which user you're going to sign in. A user has a unique ID (USERID) and you can have many users in your enterprise. In this example our user will have the ID of 050f4a44-d7d1-452e-837a-0d2759dcfa69.
Click here to find out how to create users in your enterprise
You'll next need to reference the code below to create your user's SSO token, which will sign your user in seamlessly to the Qflow backend. (Branded to you)
There are a few variables in the code we'll need to discuss.
In the $text variable you put together the above variables as so
{USERID}@{PIN}
$text = '050f4a44-d7d1-452e-837a-0d2759dcfa69@123';
Code to create a user token
<?php
$text = '050f4a44-d7d1-452e-837a-0d2759dcfa69@123';
$key = 'hfdg8AZgkKCQcNCgwOBAYIBa';
$iv = 'qflow_sec_vector';
function encrypt($plainText, $key)
{
$keyBytes = $key;
$ivBytes = $iv;
// Encrypt using OpenSSL
$encryptedBytes = openssl_encrypt(
$plainText,
'AES-256-CBC',
$keyBytes,
OPENSSL_RAW_DATA,
$ivBytes
);
$encrypted = base64_encode(encrypt($text, $key));
// token to send to Qflow
echo urlencode($encrypted);
?>
Your USERID token is now generated into $encrypted variable is placed in the URL here...
https://your_enterprise.qflowhub.io/sso?successUrl=/events&token= + $encrypted
We'll need to know the referrer. This is the domain, hosting the iframe, again you can share this with us when you request your enterprise key.
You set successUrl to /events (for all events for the user) or link to specific events for a user such as /events/edit/3b4bb391-171c-4385-80c2-d232g41962f7
your_enterprise in the link above is the prefix we'll ask for when we setup your Enterprise account.
The last piece is to place the link above in into the 'SRC' of your iframe element. This will seamlessly sign the user in without their password into the iframe.