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
i'm currently implementing OneSignal in an android app using Capacitor and this plugin. I have some weird things going on, that i want to report. I have not tested iOS yet, only android so far.
To understand my setup: When a user login into my app, i send the subscription id to the backend and associate with the current session. If the session is destroyed (for example after it expires) i want to "logout" the subscription from the user as well. I'm doing this, by creating a new user via the rest api and include the subscription in my payload. This is working fine so war, but seems to make problems on the device afterwards:
User opens the app - OneSignal Id is available
User logs in, i call .login(...) frontend side and the subscription is correctly associated to my external id
User closes the app
I transfer the subscription to a new user via rest api
Until here everything works as suggested. The dashboard still shows the subscription, but without external id and different onesignal id.
User opens the app again
App opens, subscription id is defined
App tries to load the user, fails, because the session has been destroyed and calls .logout of the sdk
Here still everything is correct. The subscription exists in the dashboard, without externalId (probably it was assigned for a short time, but then removed logout was called?)
BUT in the onesignal dashboard the subscription id now has the external id set again
So there are two problems:
The subscription id is always undefined and never set
The subscription is assigned to the external user id again
Steps to reproduce?
Described above. Let me know if you need more information.
What did you expect to happen?
In this scenario i would expect the subscription id to be defined (same as before or new one - idk). Also the subscription id should not be assigned to the external user id.
OneSignal Cordova SDK version
5.0.5
Which platform(s) are affected?
iOS
Android
Relevant log output
My log seems to be too long for github. I uploaded it for you:
What happened?
Hey there,
i'm currently implementing OneSignal in an android app using Capacitor and this plugin. I have some weird things going on, that i want to report. I have not tested iOS yet, only android so far.
To understand my setup: When a user login into my app, i send the subscription id to the backend and associate with the current session. If the session is destroyed (for example after it expires) i want to "logout" the subscription from the user as well. I'm doing this, by creating a new user via the rest api and include the subscription in my payload. This is working fine so war, but seems to make problems on the device afterwards:
.login(...)
frontend side and the subscription is correctly associated to my external idUntil here everything works as suggested. The dashboard still shows the subscription, but without external id and different onesignal id.
.logout
of the sdkHere still everything is correct. The subscription exists in the dashboard, without externalId (probably it was assigned for a short time, but then removed logout was called?)
So there are two problems:
Steps to reproduce?
Described above. Let me know if you need more information.
What did you expect to happen?
In this scenario i would expect the subscription id to be defined (same as before or new one - idk). Also the subscription id should not be assigned to the external user id.
OneSignal Cordova SDK version
5.0.5
Which platform(s) are affected?
Relevant log output
My log seems to be too long for github. I uploaded it for you:
https://github.com/OneSignal/OneSignal-Cordova-SDK/files/14232848/onesignal-issue-logs.txt
I removed my app id from the logs, if you need it and it is safe to share - let me know
Code of Conduct
The text was updated successfully, but these errors were encountered: