---
updatedAt: 2025-05-07T22:17:45.000Z
agentTools:
  projectIndex: https://help.usersnap.com/llms.txt
---

# 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 not only be connected via login and password but also SSO solutions.\
[More information on Single-Sign-On (SSO)](https://help.usersnap.com/docs/single-sign-on-sso)

And you can authenticate your users 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.

```html
<script>
	// SSO-integration retrieving the email and/or UserID
  // OKTA.getUser
  var sso_email = 'office@usersnap.com'
  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.

> 🚧 Usersnap space (global) code snippet required
>
> Please, be aware that this code example works only if you are using the space (global) snippet.