Authenticate users who submit feedback

Logged-in users giving feedback

If you want that the users of your web application are already authenticated (logged-in) and recognized by their email, you can do the following.

Connect Usersnap with OKTA (or other SSO solutions)?

Currently, the Usersnap dashboard can only be connected via oAuth of Google. We are investigating certain solutions to offer more SSO-options in the future.

But you can authenticate your users who are submitting feedback items via Usersnap in the Usersnap widget.

Authenticate users with their email in the Usersnap widget

When you initiate the Usersnap widget, set up a script to get the email and/or UserID of the users who are logged into your web application.

<script>
    // SSO-integration retrieving the email and/or UserID
  // OKTA.getUser
  var sso_email = '[email protected]'
  var sso_userID = 1234;
  
  window.onUsersnapCXLoad = function(api) {
    api.init({
      user: {
        userId: sso_userId,
        email: sso_email,
      },
    });
    window.Usersnap = api;
  }
  var script = document.createElement('script');
  script.defer = 1;
  script.src = 'https://widget.usersnap.com/global/load/[GLOBAL_API_KEY]?onload=onUsersnapCXLoad';
  document.getElementsByTagName('head')[0].appendChild(script);
</script>

Now, you can use the logged-in audience in the Configuration section and you can hide the email field in the widgets. The email will be automatically added to each feedback item.

🚧

Global snippet required

Please, be aware that this code example works only if you are using the global snippet. If you use the project-specific snippet, the code will vary a bit.

Updated 4 months ago


Authenticate users who submit feedback


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.