OneSignal / react-native-onesignal

React Native Library for OneSignal Push Notifications Service
Other
1.57k stars 374 forks source link

[Bug]: External Id is not getting set #1693

Closed AbdulBasit-Kagzi closed 1 month ago

AbdulBasit-Kagzi commented 5 months ago

What happened?

When I use OneSignal.login(${deviceId}) external Id not getting set on onesignal dashboard.

Steps to reproduce?

Install version "^5.0.6"
on homeScreen 

  useEffect(() => {
    if (!deviceId) {
      (async function () {
        // OneSignal.logout();
        const token = await DeviceInfo.getUniqueId();
        setDeviceId(token);
      })();
    } else {
      console.log('deviceIdElse', deviceId);
      OneSignal.User.addAlias('external_id', `${deviceId}`);
      OneSignal.login(`${deviceId}`);
    }
  }, [deviceId]);

What did you expect to happen?

External Id should get set and should be visible on onesignal dashboard.

React Native OneSignal SDK version

5.1.2

Which platform(s) are affected?

Relevant log output

No response

Code of Conduct

jennantilla commented 5 months ago

Hello @AbdulBasit-Kagzi thanks for reaching out! Could you please provide the logs from your device so we can take a deeper look at what's going on? Appreciate it!

jennantilla commented 1 month ago

Closing due to no response. @AbdulBasit-Kagzi if you are still having issues please open another ticket and we will be happy to assist!