You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On removing the external user id when user logout from the app. The device status in OneSignal changes to never subscribed, which leads to sending notification fails.(Mobile Application - React Native)
#1384
On user login, call the below method to set the external user-id under the particular device.
let externalUserId = '123456789'; // You will supply the external user id to the OneSignal SDK
// Setting External User Id with Callback Available in SDK Version 3.9.3+
OneSignal.setExternalUserId(externalUserId, (results) => {
// The results will contain push and email success statuses
console.log('Results of setting external user id');
console.log(results);
// Push can be expected in almost every situation with a success status, but
// as a pre-caution its good to verify it exists
if (results.push && results.push.success) {
console.log('Results of setting external user id push status:');
console.log(results.push.success);
}
});
On user logout, call the below method to remove the external user-id under the particular device.
OneSignal.removeExternalUserId((results) => {
// The results will contain push and email success statuses
console.log('Results of removing external user id');
console.log(results);
});
The text was updated successfully, but these errors were encountered:
@Chandrakala0702 apologies that this issue has gone stale. I'll be closing it out due to inactivity, but if you are still having issues please @ mention me and we can pick back up the conversation!
We have released a new User Model major release that offers many improvements and enhancements. I'd highly recommend upgrading to our latest SDK version and checking it out! Please see our migration guide for full details!
On user login, call the below method to set the external user-id under the particular device.
let externalUserId = '123456789'; // You will supply the external user id to the OneSignal SDK
On user logout, call the below method to remove the external user-id under the particular device.
The text was updated successfully, but these errors were encountered: