Advertisement
Guest User

onesignal

a guest
Apr 22nd, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. We have started with the OneSignal / Firebase setup.
  2. We need some input from you, when you request for the user to approve push notifications we need the id sent to the backend to be registered with the user.
  3.  
  4. if (currentPermission == "granted") {
  5. OneSignal.getUserId(function(userId) {
  6. console.log(userId);
  7. });
  8. }
  9.  
  10. How would you purpose to do this? We would like this OneSignal ID to be sent to us together with the CPF, is this possible for you?
  11.  
  12. If this is done after first login we can however use the token and only the id is needed to be sent with the token since we have the data we need inside the token to connect it to a user.
  13.  
  14. We suggest it should be done after login, (no point in asking for push if user didnt finish onboarding) once a user has logged in the first time a question for allowing push notifications comes, if approved it's sent to the backed with the usual auth token.
  15.  
  16.  
  17. Christian, 17:09
  18. or... would it be better to set a tag in onesignal with cpf or user_id so we can filter when sending push notifications, what's your experience an d suggestions on this?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement