Description:
I do not know if this is just my lack of understanding, but what exactly does logoutEmail do? I tried to use it to disassociate the email from device, but I can still send push notifications through the dashboard. So I turned on logging on verbose and I saw that it successfully logout email from the device but then, it runs another function where it successfully registers device again and sends a post request with email.
Device Successfully logged out of email: [email protected]
Device Registered, UserId = ...
Onesignalrestclient:
PUT SEND JSON:
{"email":[email protected]","parent_player_id":"...","app_id":"..."}
Environment
I installed through pubspec.yaml
Steps to Reproduce Issue:
Onesignal.shared.logoutEmail() with debugging on
Anything else:
I guess this is just more of a question.
I thought it reregisters the email after logout
Howdy,
Email and push subscribers will have separate OneSignal Player IDs. This is to manage the case where a user opts-out of one you can still send them messages to the other.
What do you see for the user's email record in the dashboard after you call logoutEmail?
Oh okay, I use the email as an identifier to send push notifications if that makes sense? I send push notifications where email matches.
Yes. In the segment editor, you can select to match an email from filters. Or if you are using the REST API, you can use the email parameter:
https://documentation.onesignal.com/reference#create-notification
Yes the problem is that even after I call logout, I can still send an email using the filter.
Howdy,
It's not for sending an email. It's for targeting them with push notifications _using_ email as a filter.
I am sorry, that is what I meant. even after calling logoutEmail I can still send push notifications using the email as the filter?
However once I setEmail again, it functions normally
Correct. logoutEmail decouples the two player identifiers
@rgomezp So even after doing logout email, I should be able to send the device a notification using the logged out email as a filter?
When I am using logout email provided by OneSignal and try sending notification to logged out device, it's still receiving notification despite being logged out why might that happen?
Yes that is my problem.
So I setEmail.
send push notification using email as a filter
then logoutEmail
send push notification using email as a filter <-- This still works despite the device having run logoutEmail
Thanks for the clarification and your patience.
We will investigate this issue
@Riz-waan ,
Are you seeing this on Android & iOS?
I believe so, but I haven't updated the plugin any time lately.
Howdy y'all,
This issue should now be resolved. If you are still encountering issues, please continue discussion in OneSignal/OneSignal-iOS-SDK#768
Enjoy!
Most helpful comment
Yes that is my problem.
So I setEmail.
send push notification using email as a filter
then logoutEmail
send push notification using email as a filter <-- This still works despite the device having run logoutEmail