Widgets SSO
How can I use SSO with widgets?
What is Single Sign-On
How do I set it up?
How do I pass the generated token inside widgets?
1. Set up initialization parameters before the widget SDK generated script code.
<script>
window.ProdCampSettings = {
token: '{your_generated_token}'
};
</script>
<!-- Widgets SDK code -->
<script>!function(t,e,a,n){function o(){if(!e.getElementById(a)){var t=e.getElementsByTagName(n)[0],o=e.createElement(n);o.type="text/javascript",o.async=!0,o.src="https://cdn.prodcamp.com/js/prdcmp-sdk.js",t.parentNode.insertBefore(o,t)}}if("function"!=typeof t.ProdCamp){var c=function(){c.args.push(arguments)};c.p="{product_id}",c.args=[],c.t=t.ProdCampSettings&&t.ProdCampSettings.token,c.f=true,t.ProdCamp=c,"complete"===e.readyState?o():t.attachEvent?t.attachEvent("onload",o):t.addEventListener("load",o,!1)}}(window,document,"prodcamp-js","script");</script>
<!-- /Widgets SDK code -->2. Use the ProdCamp SDK function
3. Async token generation function
Last updated