-
Notifications
You must be signed in to change notification settings - Fork 368
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
[Bug]: Using OneSignal.login() does not set externalId in Subscription Records #2043
Comments
@sebastinto thanks for reporting, I have a few follow up questions.
|
Thanks @jkasten2 !
Correct!
Removing I have a few follow-up questions if you don't mind:
|
Good to hear! However that is bug as
It seems to be a bug, the repo steps noted above will be helpful to us.
Yes, this usage is something we design for, if you call login with a different id it simply switches users.
The only reason to call logout is if you have that functionally in your app. What OneSignal does is create a new anonymous User and move the push subscription to it. This way the subscription has been dissociated from the user that was logged in. |
Dig a little bit more digging and it seems like calling External IDs do update in the OneSignalDashboard if they do not already exist even when However calling It might be worth mentioning that we recently replaced the Service Account.json with one from a different Firebase project, but I just rolled back to the previous version of the OneSignal SDK that we were using (4.8.4) and existing External IDs do update as expected in the OneSignal Dashboard.
Nice, good to know it is an option.
That makes sense. We do have that functionality in the app. Users can explicitly log out / delete local data / analytics id. |
Thanks for all the details, I have undercovered some cases we are not handling correctly and we will improve on this in the next release. |
Interesting! I'll definitely keep an eye out for an update, thanks! |
@sebastinto we released 5.1.8 which should address this issue. Thanks for the details you provided here! Let us know if the issue is completely gone after this update or not. |
That was fast!💪 I'm OOF until next week but will test when I'm back and report back. Thanks! |
Fix confirmed! Thanks! |
What happened?
Calling
OneSignal.login()
does not seem to be updating Subscription Records i.e. the External ID column values are unset.OneSignal.User.externalId
is correctly set on device.I tried on a fresh install, multiple device, calling
OneSignal.logout()
beforeOneSignal.login()
to no avail. I'm wondering if there's anything I may be missing.Tags are set correctly.
Steps to reproduce?
What did you expect to happen?
External ID updates in Subscription Records.
OneSignal Android SDK version
Release 5.1.7
Android version
13
Specific Android models
Relevant log output
os_log.txt
Code of Conduct
The text was updated successfully, but these errors were encountered: