Identify Users

Link feedback and votes to specific users in your iOS or macOS app.

Basic identification

The simplest way to identify a user is to pass their unique ID:

1

JotReview.identify(userId: "usr_7x9k2m") `

The userId should be the same stable, unique identifier you use in your own database. Avoid using email addresses as the primary ID because they can change.

Identify with email

Adding an email address enables JotReview to notify users when their feedback status changes:

1JotReview.identify(
2 userId: "usr_7x9k2m",
3 email: "ada@example.com"
4)

Full profile with avatar

Provide a complete profile so the JotReview admin dashboard can show rich user information alongside submitted feedback:

1JotReview.identify(
2 userId: "usr_7x9k2m",
3 email: "ada@example.com",
4 firstName: "Ada",
5 lastName: "Lovelace",
6 avatar: URL(string: "https://example.com/avatars/ada.jpg")
7)

Parameters

ParameterTypeRequiredDescription
userIdStringYesStable unique identifier
emailString?NoUser's email for notifications
firstNameString?NoFirst name for display
lastNameString?NoLast name for display
avatarURL?NoPublicly accessible profile image URL
signatureString?NoHMAC-SHA256 signature for secure mode

Secure identification with signature

For production apps, enable Secure Mode in Settings > Login & SSO and generate an HMAC-SHA256 signature on your server. This prevents users from impersonating each other.

Fetch the signature from your backend, then pass it with the identify call:

1async {

JotReview.identify( userId: currentUser.id, email: currentUser.email, signature: signature ) } `

See the Server Authentication article for backend implementation examples.

When to call identify

Call identify at the following points in your app lifecycle:

  • App launch — If the user has a saved session, identify them immediately after calling JotReview.setup()
  • After login — Identify the user as soon as they successfully authenticate
  • After profile update — Re-identify the user to sync changes to their name, email, or avatar
1// In your auth manager, after a successful sign-in
2func handleSuccessfulLogin(_ user: User) {
3 // Your app state update

// Sync identity to JotReview JotReview.identify( userId: user.id, email: user.email, firstName: user.firstName, lastName: user.lastName ) } `

Logout

When the user signs out of your app, call JotReview.logout() to clear their identity from the SDK. After logout, the widget returns to anonymous mode.

1func handleLogout() {
2 // Your app's sign-out logic

// Clear JotReview identity JotReview.logout() } `

Failing to call logout() means the next person to use the device could submit feedback under the previous user's identity.

Anonymous feedback

If you do not call identify, the SDK operates in anonymous mode. Anonymous users can still submit feedback and vote on features, but their submissions will not be linked to a user account in your JotReview dashboard.

You can allow anonymous submissions and then merge them with a user identity later — for example, if you want to collect feedback before requiring a login.

Troubleshooting

Feedback appears as anonymous despite calling identify

Make sure you are calling identify after setup, not before it. The SDK must be initialized first.

User identity is not updating after profile changes

Call identify again with the updated fields. The SDK will replace the current user data.

Secure mode rejecting valid signatures

Double-check that you are signing exactly the userId string (no surrounding whitespace or extra fields) with the secret key from Settings > Login & SSO. The hash must be lowercase hex.