Securely Hash User Id's

How to create a hash from the user_id

Tamas Ham-Szabo Written by Tamas Ham-Szabo I

In the backend of your application, you need to create a hash from the customer's user_id using HMAC SHA-256. To generate a hash, you need to use a security key that you can find in your application here: https://app.saasfirst.com/inbox/settings/installation.


How to Hash user_id?

You can find a number of examples on this page on how you can hash the user_id's: https://github.com/danharper/hmac-examples.


In these examples:

  • key: the security key found in your SAAS First workspace
  • message: the user's id in your application

When you send us customer details, including the user id, and the hash of the user id, we will check if the id was hashed using the same key, therefor we will know it was sent by your application.


Did this answer your question?

🙁 🙂 😀