Skip to content

fix(types): Pick email & userId for loginUserWithUserAttributes #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kendepelchin
Copy link

@kendepelchin kendepelchin commented Apr 24, 2025

I started implementing intercom in a react-native project and when I looked at the types for loginUserWithUserAttributes I saw that i could pass the following:

export type UserAttributes = {
  companies?: Company[];
  customAttributes?: CustomAttributes;
  email?: string;
  languageOverride?: string;
  name?: string;
  phone?: string;
  signedUpAt?: number;
  unsubscribedFromEmails?: boolean;
  userId?: string;
};

This didn't seem to work, as I needed to login first, and update the user after. All data I passed to this function was ignored (besides email & userId).
If I look at the native implementation I can see that only email & userId can be provided to the loginUserWithUserAttributes function.

If I missed anything, feel free to guide me towards the proper implementation.

Thanks for making this open source 🙏

@kendepelchin kendepelchin changed the base branch from main to dev April 28, 2025 10:00
@kendepelchin kendepelchin changed the base branch from dev to main April 28, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant