Setting Up Single Sign-On (SSO) for Your Users

You can configure Single Sign-On (SSO) for your Wix Answers account. This enables your users to use the same login form and credentials that they use across your services and sites in order to access your Wix Answers site.

Setting up SSO requires some coding on your part, as described below.

Integrating SSO with Wix Answers

Step 1: Set Up SSO Login and Logout URLs

Configure the page URLs to which you want your users to be redirected when they click to login and logout from your Wix Answers site. 
  1. Hover over Settings in the side panel, hover over Help Center, and click Advanced. Scroll down to the Authentication and Login Options section and click Edit next to Login method is set as Default.
    (Or navigate to https://<tenant_subdomain>
  2. Select Single Sign-On (SSO) and provide the following information: 
    • SSO Remote Sign-in URL: Enter the page URL that you want your users to be redirected to in order to log in.
    • SSO Remote Sign-out URL: Enter the page URL that you want your users to be redirected to when they logout.
  3. Click Save

Step 2: Create API and Secret Keys

  1. Hover over Settings in the side panel, click Webhooks & API, click the App Keys tab.
    (Or navigate to https://<tenant_subdomain>
  2. Click Add API Key.
  3. Enter a name for your API key and click Save.
  4. Do one of the following:
    • Copy the API key.
    • Click Reveal Secret and copy the Secret key.

Understanding the Wix Answers SSO Workflow

  1. Set up your SSO Login and Logout URLs (see Step 1 above) and create API and secret keys (see Step 2 above).

    For example:
    SSO remote sign in URL:
    SSO remote sign out URL:

  2. Your user clicks to login to your Wix Answers site.
  3. The user is redirected to your log in page. Before redirecting the user to your log in page, Wix Answers appends a redirect URL parameter to the request. This is the
    Wix Answers callback URL that tells your system to where to redirect the user after the user has been authenticated.

    For example:
    Wix Answers redirects the user to:  to<answers-sso-callback-url>

  4. Your user logs in using the same credentials they use to login to your other services and sites.
  5. Your system determines if the user is authenticated.
  6. Once authenticated, your system generates a JSON structure containing the relevant user data. The JSON must include some fields, and may include other fields, as follows:

    • id (required): The user ID in your internal system

      Within Wix Answers, this value is sometimes used and called the "external ID". For example, see Get an SSO User's Information by External ID.

    • email (required): The user's email 
    • timestamp (required): The current timestamp (UTC) in milliseconds (Unix time format)
    •  firstName 
    • lastName 
    • displayName 
    • profileImage: The full URL to the user's profile image 

  7. Use the Wix Answers Secret key to encrypt the JSON structure and generate an encrypted SSO token.
  8. Append the encrypted SSO token parameter and the API key ID to the Wix Answers callback URL and redirect the user back to Wix Answers.

    For example:
    Your system redirects the user to Wix Answers: <answers-sso-callback-url>&token=<encrypted sso token>&key=<api key id>

  9. Wix Answers retrieves the encrypted SSO token that was appended to the URL (containing the encrypted user data and the API key ID) and decrypts the SSO token to extract the user data.
  10. Your user logs out.
    • If you configured an SSO logout URL in your Wix Answers account: Wix Answers redirects your users to your logout page. Your system can then remove the relevant cookies and log your user out from your other sites or services.
    • If you did not configure an SSO logout URL in your Wix Answers account: The user is only logged out of your Wix Answers site and continues to be logged in to your other sites and services. 

Code Examples

We have compiled the following examples to help you get started: