This article covers advanced SSO configuration: the loginIdentifier connect feature for imported subscribers, the verificationUrl option for custom email verification, and the showLoginIdentifier link.
loginIdentifier: connecting imported accounts
If you have imported subscriptions from an external system, some customers may exist in Frisbii Media without an email address. These customers cannot log in via the standard SSO flow. The loginIdentifier connect feature guides them through linking their imported account to an email address.
Prerequisites: You must enable and configure this feature in the SSO Settings in the Frisbii Media backend before using it.
To start the registration flow with the connect feature enabled:
// Checkout finishes with a javascript-Event one have to listen to
document.addEventListener("plenigo.LoginSuccess", function(e) {
console.info("Event is: " + e.type);
console.info(e);
console.info("Custom data is: ", e.detail);
// here we redirect to a new page
location.href = "/start-session/?session=" + e.detail.customerSession;
});
// start the process
var config = {
elementId:"plenigoLogin", // the DOM element you want to put the iframe in
loginIdentifier: true
};
new plenigo.SSO(config).register();showLoginIdentifier: showing the connect link in registration
To show a link in the standard registration screen that lets users navigate to the connect feature themselves:
// start the process
var config = {
elementId: "plenigoLogin", // the DOM element you want to put the iframe in
showLoginIdentifier: true // show link to connect feature in registration screen
};
new plenigo.SSO(config).register();You can replace the default label with custom text by passing a string instead of true:
// start the process
var config = {
elementId: "plenigoLogin", // the DOM element you want to put the iframe in
showLoginIdentifier: "Click here to connect with an existing subscription" // show link to connect feature in registration screen
};
new plenigo.SSO(config).register();verificationUrl: custom email verification flow
By default, after a new user registers, Frisbii Media sends an email with a verification link that points back to the Frisbii Media-hosted verification page. If you want to control that verification step yourself (e.g. to apply your own branding or session logic), you can pass a verificationUrl that Frisbii Media will use instead.
// Checkout finishes with a javascript-Event one have to listen to
document.addEventListener("plenigo.LoginSuccess", function(e) {
console.info("Event is: " + e.type);
console.info(e);
console.info("Custom data is: ", e.detail);
// here we redirect to a new page
location.href = "/start-session/?session=" + e.detail.customerSession;
});
// start the process
var config = {
elementId:"plenigoLogin", // the DOM element you want to put the iframe in
verificationUrl: "https://www.example.com/start-email-verification" // url that points to verification process on your site
};
new plenigo.SSO(config).register();Handling the verification on your side
When a user clicks the verification link in their email, Frisbii Media will append two query parameters to your verificationUrl:
verificationTokentoken
Your page reads both parameters and calls the Frisbii Media API to complete verification:
POST https://api.frisbii-media-stage.com/api/v3.0/customers/registration/validate
See the API reference for the full request schema.
You can find the placeholder for the verification URL in the Email Templates section of the Frisbii Media backend — look for the registration confirmation email template.