shaggun / verification

Code samples of how to generate sha256 HMAC signatures of your user identifier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Verification (aka. Secure Mode)

Code samples of how to generate timestamp-anchored SHA256 HMAC signature of your user identifier

Please add a PR with any changes that you find along the way!


Updating your installation

When updating the on-page Chameleon snippet to work with Secure mode, follow the examples below:

When using plain JavaScript:

chmln.identify(USER_ID, { uid_hash: USER_ID_HASH_FROM_BACKEND });

When using Segment.com:

// Two calls, first skipping Chameleon then second with only Chameleon
//
analytics.identify(USER_ID, OPTIONS, { Chameleon: false });
analytics.identify(USER_ID, { uid_hash: USER_ID_HASH_FROM_BACKEND, ...OPTIONS }, { All: false, Chameleon: true });

About

Code samples of how to generate sha256 HMAC signatures of your user identifier

License:MIT License


Languages

Language:Java 19.4%Language:Go 17.1%Language:Python 14.0%Language:JavaScript 13.5%Language:C# 12.2%Language:PHP 11.9%Language:Ruby 11.9%