Support experimental JWT feature (not available yet) #356
+107
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We're working on an experimental feature to allow you to authenticate with the messenger using a JWT token instead of sending a user_hash.
This feature is not currently general release however we will be seeking beta customers early next year (2025). If you are interested drop us a line at [email protected] (even if you don't use the rails gem!)
Description of the feature
When launching the Messenger for a logged-in User, you can provide a signed JSON Web Token in the intercom_user_jwt attribute of the Messenger payload.
This JWT can contain any User Data Attributes you want to securely send for the user. If you want to ensure those attributes can only be updated by you, you should disable Messenger updates for these Attributes, and as long as they are signed, they will still be updated.
You can use industry standard JWT libraries to generate the token, using your Messenger API Secret as the secret key.
A Messenger installation with JWTs requires minimal change compared to basic Identity Verification.
Example Server-Side Configuration
Example Client-Side Configuration