Skip to main content
Version: Isle Royale (2.5.0)

Signer Identifiers and Email Addresses

Properly identifying signers is crucial for creating legally binding acceptance records and enabling easy retrieval of agreements. ToughClicks provides multiple ways to identify your users.

Overview​

There are three ways to help identify your users in the ToughClicks system:

  1. Signer ID / Signer ID Selector - Required unique identifier (choose one method)
  2. Signer Email Address - Optional but recommended for searchability
  3. Custom Data - Optional additional identifying information

This document covers the first two methods. For custom data, see Custom Data.

Signer ID (Required)​

You must provide one and only one of these identifier methods. This is the primary way ToughClicks identifies who is accepting your terms.

Method 1: signerIdSelector​

Use this when you have a form field where users enter their identifying information.

When to use:

  • Users are filling out a registration or sign-up form
  • You collect email, username, or other identifier via form input
  • The identifier is entered during the acceptance flow

How it works:

The signerIdSelector is the HTML ID of a form input field. ToughClicks will listen for changes in this field and automatically use its value as the signer identifier.

Example:

<form>
<label for="email">Email Address</label>
<input type="email" id="email" placeholder="Enter your email" />

<div id="tc-container"></div>

<button type="submit">Create Account</button>
</form>
const { ToughClicks } = window.ToughClicks;
const tc = new ToughClicks(clientToken, packetId);

tc.setDisplayOptions({
containerId: 'tc-container',
displayMethod: 'Individual',
signerIdSelector: 'email' // Matches the input ID
});

ToughClicks will automatically detect when the user types in the email field and use that value as the signer identifier.

Method 2: signerId​

Use this when you already have the user's identifier in your application.

When to use:

  • User is already signed in to your application
  • You're using a UUID or internal user ID
  • The identifier is not collected via a form during the acceptance flow
  • Integration occurs post-authentication

How it works:

The signerId is a string value you provide directly. ToughClicks uses this immediately without waiting for user input.

Example:

const { ToughClicks } = window.ToughClicks;
const tc = new ToughClicks(clientToken, packetId);

// User is already authenticated
const currentUser = getCurrentUser(); // { id: 'uuid-1234', email: 'user@example.com' }

tc.setDisplayOptions({
containerId: 'tc-container',
displayMethod: 'Group',
signerId: currentUser.id // Use UUID directly
});

Choosing Between signerIdSelector and signerId​

FactorsignerIdSelectorsignerId
User stateNot yet identifiedAlready authenticated
ID sourceForm inputApplication state
TimingCollected during flowAlready available
Use caseRegistration, sign-upPost-login, settings
Example IDsEmail from inputUUID, user ID

Important: You must provide one and only one of these options. Providing both or neither will result in an error.

Choosing Your Identifier Type​

For most use cases, we recommend using email addresses as your signer identifier unless your security or privacy requirements prevent sharing email addresses with ToughClicks. Email addresses provide excellent searchability and are familiar to users.

If your security practices, compliance requirements, or privacy policies prevent using email addresses, UUIDs are a strong alternative that provide consistent identification across your system.

If you're using a non-email identifier (like a UUID), we strongly recommend also setting the signer's email address. This makes it much easier to search for and retrieve agreements in the ToughClicks Management Portal.

Setting the Email Address​

Use the setSignerEmailAddress() method:

tc.setSignerEmailAddress('user@example.com');

When to call this:

  • After initializing the ToughClicks instance
  • Before calling accept() (if using manual acceptance)
  • Any time before the acceptance is created

Example with UUID​

const { ToughClicks } = window.ToughClicks;
const tc = new ToughClicks(clientToken, packetId);

const currentUser = getCurrentUser();
// currentUser = { id: 'uuid-1234-5678', email: 'john@example.com' }

tc.setDisplayOptions({
containerId: 'tc-container',
displayMethod: 'Individual',
signerId: currentUser.id // Use UUID as primary identifier
});

// Set email for searchability
tc.setSignerEmailAddress(currentUser.email);

Example with Form Input​

If you're using signerIdSelector with an email field, you don't need to call setSignerEmailAddress() separately - the email is already being used as the identifier:

// Email is already the signer ID - no need for setSignerEmailAddress
tc.setDisplayOptions({
containerId: 'tc-container',
displayMethod: 'Individual',
signerIdSelector: 'email' // Email is the identifier
});

However, if you're using a non-email field as the identifier, you can still set the email separately:

<input type="text" id="username" placeholder="Username" />
<input type="email" id="email" placeholder="Email" />
tc.setDisplayOptions({
containerId: 'tc-container',
displayMethod: 'Individual',
signerIdSelector: 'username' // Username is the primary identifier
});

// Also set email for searchability
document.getElementById('email').addEventListener('change', (e) => {
tc.setSignerEmailAddress(e.target.value);
});

Benefits of Setting Email Address​

Setting the email address provides several benefits:

  1. Searchability - Easily find agreements by email in the Management Portal
  2. Communication - Email is included in the acceptance record for reference
  3. Verification - Email helps verify the signer's identity if the acceptance is challenged
  4. User Experience - Easier for users to request copies of their agreements

Complete Examples​

Registration Form (Email as ID)​

const { ToughClicks } = window.ToughClicks;
const tc = new ToughClicks(clientToken, packetId);

tc.setDisplayOptions({
containerId: 'tc-container',
displayMethod: 'Scroll',
signerIdSelector: 'user-email' // Email field ID
});

// Email is automatically used as both identifier and email address

Post-Login (UUID as ID)​

const { ToughClicks } = window.ToughClicks;
const tc = new ToughClicks(clientToken, packetId);

const user = await getCurrentUser();

tc.setDisplayOptions({
containerId: 'tc-container',
displayMethod: 'Individual',
signerId: user.uuid
});

// Set email for searchability in ToughClicks dashboard
tc.setSignerEmailAddress(user.email);

Dynamic Email Update​

const { ToughClicks } = window.ToughClicks;
const tc = new ToughClicks(clientToken, packetId);

tc.setDisplayOptions({
containerId: 'tc-container',
displayMethod: 'Individual',
signerIdSelector: 'username'
});

// Update email when user types
document.getElementById('email-field').addEventListener('input', (e) => {
if (e.target.value && validateEmail(e.target.value)) {
tc.setSignerEmailAddress(e.target.value);
}
});

function validateEmail(email) {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}

Additional Identifying Information​

Beyond the required identifier and recommended email address, you can provide additional information to help verify the signer's identity using custom data.

Custom data:

  • Is included in the PDF agreement
  • Helps verify user identity if the acceptance is challenged
  • Is not searchable via the ToughClicks dashboard
  • Can include demographic info, session data, location, etc.

See Custom Data for detailed information.

Best Practices​

Use UUIDs When Appropriate​

While email addresses are recommended for most use cases, UUIDs are generally more consistent than email addresses and may be preferable when users can change their email addresses or when security requirements necessitate additional privacy:

// UUID as primary identifier
signerId: user.uuid

// Still set email for searchability
tc.setSignerEmailAddress(user.email);

Searching for Agreements​

In the ToughClicks Management Portal, you can search for agreements by:

  • Signer ID (the value from signerId or signerIdSelector)
  • Signer Email Address (if set via setSignerEmailAddress())

This is why setting the email address is important even when using UUIDs - it makes finding specific agreements much easier.

See Downloading Agreements in the Management Portal documentation.