Open npm1 opened 1 year ago
@bvandersloot-mozilla please take a look
Ping
I noticed this PR is still relevant. Rebased since it was pretty old but still want to merge this. Anyone have any further comments?
Computing a secret bit and using it to re-sort a list returned to the webpage is not a good pattern. If we are going to alter the output, it should at least be observable why. This is hard to work with. Is
accounts[0]
previously used?accounts[n-1]
?
The idea is that accounts[0]
is previously used. @yi-gu do you remember why we do not expose whether an account is returning or not explicitly in this API? It's not clear to me.
The idea is that accounts[0] is previously used. But you can't guarantee that.
The idea is that accounts[0] is previously used. But you can't guarantee that.
You can. getUserInfo
only returns anything if there are returning accounts. And we surface returning accounts first, followed by other accounts. So accounts[0]
is a returning account.
This PR fixes the order of returned accounts in
getUserInfo()
. The returning list should list the returning accounts first, and then all the remaining accounts.Fixes https://github.com/fedidcg/FedCM/issues/625
Preview | Diff