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

Do not store data under Bungie.net membership ID #141

Open
bhollis opened this issue Mar 6, 2023 · 2 comments
Open

Do not store data under Bungie.net membership ID #141

bhollis opened this issue Mar 6, 2023 · 2 comments
Assignees

Comments

@bhollis
Copy link
Contributor

bhollis commented Mar 6, 2023

It turns out that users can relink their Destiny profiles to different Bungie.net accounts, and in fact they may do this without knowing (perhaps by choosing different login options? IDK). Unfortunately all data in DIM Sync is stored under (bungie membership id, profile membership id) keys, so this makes their data inaccessible after the change.

To fix this, we could switch to storing only by profile membership ID. Then, we'd need to change the auth token to include a list of all profile membership IDs accessible from the logged in account, and use that to validate access to each bit of data. This has one glaring downside, which is that if the user links a different profile to the same Bungie.net account, they won't see it. Remember that users can still have multiple profiles if cross-save is off! However, this may be worth it, vs "my loadouts suddenly disappeared" as a logout/login will fix it.

@bhollis
Copy link
Contributor Author

bhollis commented May 24, 2023

OK, I fixed a bug. So 30 days from now it should be good.

@bhollis
Copy link
Contributor Author

bhollis commented Jul 2, 2023

All tokens have been regenerated with the list of profile IDs included in the JWT - we can now safely start relying on that info.

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