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
This creates two accounts with the same account id. That is a problem because GET /_users/_design/byId/_view/byId?key="<ID HERE>" will now return two results, but only the first one is used. If I sign in two the second account, my session will not be valid when using the byId view to find the account doc to validate it against.
We must prevent multiple account docs to be created that have the same account id. I don’t know what the best strategy for that could be. We might want to change how we store accounts entirely and instead of making the username part of the doc._id, we use the id instead, as the username can change while the account id cannot. We’ll have to guarantee both to be unique anyway.
The text was updated successfully, but these errors were encountered:
This is pulled from hoodiehq#725, originally written by @gr2m
Comment with possible implementation is referenced hoodiehq#725 (comment)
Today I can do this:
This creates two accounts with the same account id. That is a problem because
GET /_users/_design/byId/_view/byId?key="<ID HERE>"
will now return two results, but only the first one is used. If I sign in two the second account, my session will not be valid when using thebyId
view to find the account doc to validate it against.We must prevent multiple account docs to be created that have the same account id. I don’t know what the best strategy for that could be. We might want to change how we store accounts entirely and instead of making the username part of the
doc._id
, we use the id instead, as the username can change while the account id cannot. We’ll have to guarantee both to be unique anyway.The text was updated successfully, but these errors were encountered: