Getting Started

The following javascript block must be added to the head section of the partner page.

NOTE: jQuery 1.10 or higher is required.

JavaScript source environments:

Integration: https://privohub-int.privo.com/
Production: https://privohub.privo.com/

JavaScript block:

<script id="privoLoginJS"  type="text/javascript">
  var js = document.createElement("script");
  js.src = 'https://privohub-int.privo.com/client/privo-login.js';
  
  js.onload = function () {
  
  /*
      PRIVO Login configuration object
  */
  privoLoginConfig = {
      loginDisplay: [ PRV.DisplayType.NORMAL | PRV.DisplayType.SIMPLE | PRV.DisplayType.TEMPLATE ],
      siteIdentifier: '[ Partner siteId ]',
      loginPageName: '[ When loginDisplay = PRV.DisplayType.TEMPLATE this is the name of the login template ]',
      state: '[ Opaque value used by the partner to maintain state between the logout request and the callback to the endpoint ]',
      clientId: '[ OAuth client_id ]',
      scopes: [ Requested user scopes, ex: ["openid", "profile", "user_profile", "additional_info"] ],
      prompt: [ Requested login prompt, ex: ["none", "login", "consent", "select_account"] ],
      width: [ Recommended width of login window, ex: 400],
      height: [ Recommended height of login window, ex: 375]
  };
  /*
      Register event handlers
  */
    PRV.login.addEventHandlers({
        onLogin:handleLoginEvent,
        onLoginError:handleLoginEvent,
        onClose:handleClosePopupEvent
    });
  };
  document.getElementsByTagName("head")[0].appendChild(js);
</script>