You can enable enhanced security for the editor by enforcing identity verification. Identity verification prevents third parties from impersonating your logged-in users and using the Unlayer editor. We strongly recommend that you enforce identity verification.

Setup Identity Verification

To set up identity verification, you'll need to generate an HMAC on your server for each logged-in user and send it to Unlayer.

In order to enable this, you must send us a user object which contains a unique ID for the user, and a generated HMAC signature.

  user: {
    id: 1,
    signature: 'XXX',
    name: 'John Doe', // optional
    email: '[email protected]' // optional

Generate Signature

You can generate the HMAC signature on your server using the following code:


Project Secret

Keep your secret key safe! Never commit it directly to your repository, client-side code, or anywhere a third party can find it.

const crypto = require('crypto');

const signature = crypto
	.createHmac("sha256", "[PROJECT-SECRET]") // secret key (keep safe!)
require 'openssl'

  'sha256', # hash function
  '[PROJECT-SECRET]', # secret key (keep safe!)
  '[USER-ID]' # user's id
  'sha256', // hash function
  $user->id, // user's id
  '[PROJECT-SECRET]' // secret key (keep safe!)
import hmac
import hashlib
  b'[PROJECT-SECRET]', # secret key (keep safe!)
  bytes(, encoding='utf-8'), # user's id
  digestmod=hashlib.sha256 # hash function

You can get your project secret from project settings in the Unlayer dashboard.