freeotp / freeotp-ios

Apache License 2.0
676 stars 167 forks source link

adding a second user from one provider changes the icon of other instances from that provider #226

Open jmtd opened 3 years ago

jmtd commented 3 years ago

Yesterday I added a Microsoft account (for Newcastle University) to the authenticator app and chose a nice yellow icon for it.

This morning I have added a second, different MS account (again for Newcastle University) and chose a different green icon to distinguish it from the other one. However once I completed adding the account, both of the Newcastle University entries were the green icon.

To be clear the two accounts are userid@newcastle.ac.uk with different values of userid.

justin-stephenson commented 3 years ago

When a token is added and an icon is selected, FreeOTP saves an issuer -> icon mapping to UserDefaults. The second token you added likely has the same Issuer which overwrites the previous mapping, resulting in the duplicate icon behaviour. This could be improved but at the moment Issuer -> icon mapping is all that we support.

alanfx commented 2 years ago

This is also why it would be nice to be able to give a name to a token, especially in this case where you might have multiple logins to a single website like AWS. Icons can’t be used to distinguish them.