User Hash Property / Formatting
Closed this issue · 1 comments
Issue Description
In order to properly implement Identity Verification, Intercom requires a user_hash property to be passed on boot along with an identifier that was hashed (either user_id or email). In addition to passing along the identifier, the hashed identifier needs to be passed as user_hash .
Unfortunately, I'm only able to pass "userHash" in camel case instead of "user_hash" due to the way the DataAttributes type is defined in this library.
The end result is I'm able to produce the correct hash, but because it is being assigned to the incorrect property, Intercom is recognizing it as an invalid hash.
Relevant Links
This would appear to need to be corrected in multiple places:
Expected behavior
Once adjusted, the hash should be accepted as valid by Intercom.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: macOS
- Browser: Arc
- Version [Arc Version 1.30.0 (46409) / Chromium Engine Version 121.0.6167.184)]
Thank you for providing this detailed description.
The issue you have raised appears to be invalid. Indeed, the API of this library utilizes camel-cased attributes1 (a design choice that, in retrospect, I regret). However, it is essential to note that internally, these camel-cased attributes are mapped to their corresponding official Intercom attributes. You can find further details on this mapping process at https://github.com/devrnt/react-use-intercom/blob/main/packages/react-use-intercom/src/mappers.ts#L69.
Let me know if you need anything else.
Footnotes
-
except for the entries that are passed to
customAttributes
↩