Skip to content
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

Make device tokens unique #43

Open
jasonaowen opened this issue Jun 7, 2021 · 0 comments
Open

Make device tokens unique #43

jasonaowen opened this issue Jun 7, 2021 · 0 comments

Comments

@jasonaowen
Copy link
Contributor

It seems that our initial plan to allow for multiple users on the same device was misguided. iOS does not allow our app the degree of flexibility in handling messages and choosing to show or not show notifications that we expected from reading the Firebase documentation, and so we need to be more selective in what we send. More importantly, as the app does not support multiple users at this time, it can lead to the app receiving and displaying notifications for a user who is not signed in.

This was partially addressed in #36, by having the back-end call the new delete token endpoint on logout. @v-rusu pointed out in #38 that the delete endpoint cannot address all cases; we need to enforce uniqueness throughout. This includes:

  • Delete any current duplicates
  • Replace the primary key on devices to be only on (device_token)
  • Update the conflict handler
  • Add an updated_at column to add some visibility into when the device token was reassigned or last used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant