Skip to content

Add support for auth_tokens in boot and update methods - #820

Merged
devrnt merged 4 commits into
devrnt:mainfrom
nhibberd:feat/auth-tokens-support
Jul 30, 2026
Merged

Add support for auth_tokens in boot and update methods#820
devrnt merged 4 commits into
devrnt:mainfrom
nhibberd:feat/auth-tokens-support

Conversation

@nhibberd

@nhibberd nhibberd commented Aug 2, 2025

Copy link
Copy Markdown
Contributor

Users can now pass authentication tokens to Intercom for secure data operations. The authTokens property accepts an object with any string key-value pairs.

Example usage:
boot({
email: 'john.doe@example.com',
userId: '9876',
authTokens: {
security_token: 'abc...' // JWT
}
})

🤖 Generated with Claude Code

Users can now pass authentication tokens to Intercom for secure data operations. The authTokens property accepts an object with any string key-value pairs.

Example usage:
boot({
  email: 'john.doe@example.com',
  userId: '9876',
  authTokens: {
    security_token: 'abc...' // JWT
  }
})

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ff8584

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
react-use-intercom Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kane-chang

Copy link
Copy Markdown

@nhibberd hello! I'm currently facing this limitation with auth_tokens, will this PR be continued? 🙏

@chrisvander

Copy link
Copy Markdown

@kane-chang You can, for now, just use customAttributes, e.g.

customAttributes: {
  auth_tokens: {
    // ...
  }
}

devrnt and others added 2 commits July 30, 2026 19:50
Layer the setAuthTokens method (Intercom('setAuthTokens')) on top of the
existing auth_tokens attribute so per-user Data Connector tokens can be
refreshed at runtime without a full update, matching the vanilla Intercom
SDK. Wire it through the provider, types, README and tests, clarify how
authTokens relates to intercomUserJwt, and drop the `as any` casts in the
test in favour of the typed window globals.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	packages/react-use-intercom/README.md
#	packages/react-use-intercom/src/mappers.ts
#	packages/react-use-intercom/src/provider.tsx
#	packages/react-use-intercom/src/types.ts
@devrnt

devrnt commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Thanks!

@devrnt
devrnt merged commit 5d8f791 into devrnt:main Jul 30, 2026
2 of 3 checks passed
@devrnt

devrnt commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Released in 5.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants