Skip to content

Commit 1d3ee14

Browse files
committed
Add intercom user jwt
1 parent a89e173 commit 1d3ee14

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/react-use-intercom/src/mappers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export const mapDataAttributesToRawDataAttributes = (
7474
companies: attributes.companies?.map(
7575
mapDataAttributesCompanyToRawDataAttributesCompany,
7676
),
77+
intercom_user_jwt: attributes.intercomUserJwt,
7778
...attributes.customAttributes,
7879
});
7980

packages/react-use-intercom/src/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export type RawDataAttributes = {
135135
user_hash?: string;
136136
company?: RawDataAttributesCompany;
137137
companies?: RawDataAttributesCompany[];
138+
intercom_user_jwt?: string;
138139
customAttributes?: Record<string, any>;
139140
};
140141

@@ -217,6 +218,12 @@ export type DataAttributes = {
217218
* @see {@link https://www.intercom.com/help/en/articles/186-group-your-users-by-company}
218219
*/
219220
companies?: DataAttributesCompany[];
221+
/**
222+
* The JWT for authenticating users in the Messenger
223+
*
224+
* @see {@link https://www.intercom.com/help/en/articles/10589769-authenticating-users-in-the-messenger-with-json-web-tokens-jwts}
225+
*/
226+
intercomUserJwt?: string;
220227
/**
221228
* You can do this anytime by adding additional key/value pairs to your intercomSettings code snippet
222229
* These should be raw snake_cased

0 commit comments

Comments
 (0)