Gigya Job Openings

accounts.setSSOToken JS

Skip to end of metadata
Go to start of metadata

Description

 

Creates a redirect through Gigya's SSO endpoint and sets an SSO token for the logged in user.

Using accounts.setSSOToken requires that the enableSSOToken parameter of the global Conf be enabled (set to true).

Syntax

 

Parameters

The following table lists the available parameters:

 

RequiredNameTypeDescription
redirectURL String

A URL to redirect to after the process is complete. By default, the method will redirect to the page that initiated the call.

The URL must be within the same domain that performed the login and the page it refers to must contain the gigya.js script.

 

Code Sample

var params = {
    redirectURL: "example.com/welcome"
};
gigya.setSSOToken(params); 

 

Notes:

  • 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.
  • In some cases it is necessary to connect/login the user to a provider ? prior to calling the API method. You can learn more in the Social Login guide.