Gigya Job Openings

customButtons Array of Objects

Skip to end of metadata
Go to start of metadata


customButtons Array

An array of JSON objects containing at least one unique Custom Button object (below).

customButtonsJSON arrayA JSON array of Custom Button objects (defined below). This array must include at least a single button object.


Custom Button Object

A JSON-encoded object representing a single unique custom button.

Any unique user account can only be connected to a single custom SAML IdP or OIDC OP. Once connected, the user will not be able to use a different SAML/OIDC provider if they exist. However, a user can be associated with both a SAML IdP and an OIDC OP concurrently.


providerNamestringThe provider name to display in the login popup window (button title) and to remember as the last login name. 
iconURLstringThe URL of the icon to display on the button (the icon will be re-sized to fit the selected size).

The name of the IdP or OP as defined within the Gigya console SAML Login or OIDC Login configuration.

In this SAML example:

The idpName is:

idpName: "otp-raasDemoIdp"

In this OIDC example:

The opName is:

opName: "testone"

When using SAML this must be idpName and when using OIDC this must be opName.

lastLoginIconURLstringThe URL of the icon to display on the button when this provider was the last one used for login.
typestringCan be either openID, oidcsaml or eventOnly. The default value is eventOnly, which means that only an onButtonClicked Event will be fired. When using a SAML Login or OTP IdP, type must be saml. When using OIDC Login, type must be oidc.
positionintegerThe index of the button within the Social Login widget. The regular provider buttons should be organized to fill the gaps between custom buttons. The default is 1 (top-left position) for the first button, and remaining buttons will appear in the order they are defined within the array, unless otherwise specified.
logoURLstringThe URL of the icon to display in the login dialog.
openIDURLstringA URL template representing an OpenID user where $USERNAME$ represents the placeholder for the username. For example:$USERNAME$. When this parameter is provided it should be passed on to the server login call. Required if type='openID'.


Code Example

customButtons= [
    {   // Custom Button object #1
        "type": "saml",
        "providerName":"Gateway One",
        "iconURL": "",
        "logoURL": "",
    {   // Custom Button object #2
        "type": "saml",
        "providerName":"Gateway Two",
        "iconURL": "",
        "logoURL": "",
    {   // Custom Button object #3
        "type": "oidc",
        "iconURL": "",
        "logoURL": "",



  • This sample is not meant to be fully functional code. For brevity's sake, only the code required for demonstrating the API call itself is presented.
  • To run the code on your own domain, add your Gigya API key to the gigya.js URL. A Gigya API key can be obtained on the Site Dashboard page on Gigya's website. Please make sure that the domain from which you are loading the page is the same domain name that you used for generating the API key.


Global Configuration

You can add this array globally to your site by including it in the Global Configuration for your site from the corresponding Console tab.



Related Plugin Events


onButtonClicked Event Data

In the event that a user clicks a customButton, the button field is returned as a field of the onButtonClicked event.

eventNamestringThe name of the event.
sourcestringThe source plugin that generated this event. The value of this field is the name of the plugin's API method, e.g., 'showLoginUI', 'showCommentsUI', etc.
contextobjectThe context object passed by the application as parameter to the API method, or null if no context object has been passed.
buttoncustomButton objectAn object representing the custom button that has been clicked within the UI. If the clicked button is not a custom button, no customButton object will be returned.





  • No labels