twofas / 2fas-android

Source code for 2FAS Android app
GNU General Public License v3.0
785 stars 62 forks source link

Ability to add custom logo #6

Open ScottESanDiego opened 1 year ago

ScottESanDiego commented 1 year ago

Migrating from Authy to 2FAS, and noticing a lot of site logos that are missing. The "change the color and 2 letters" customization is good, but would be nice to be able to give a URL to a logo to be used (or otherwise somehow paste in an image).

AkazaRenn commented 1 year ago

I suggest using the favicon of the service's website, given that we are already saving that information when it is used with the Chrome extension.

Adding icons site by site is a tough work and I believe it will never come to an end, an easier solution would be good for both users and developers. We can have another section in an entry saying "website" or something, which user can set and later tap to go to that website directly. This website should have provided an favicon to be used as the icon in 2FAS.

Screenshot_20230228-201759.png

This is what I use currently, called SafeInCloud. It's actually a password manager but still does a good job as a TOTP generator. The icon is usually pulled from the favicon of the website section you can find in the screenshot, in most of the time it serves the purpose pretty well.

2fas-com commented 1 year ago

If you want to know more about the icon-adding process, please visit our discord channel!

ScottESanDiego commented 1 year ago

I suggest using the favicon of the service's website, given that we are already saving that information when it is used with the Chrome extension.

Yes, that's what Bitwarden does as well (also a password manager that has TOTP).

Lordmau5 commented 1 year ago

While the favicon is a great first option, allowing us to select a completely custom icon would be far better in my opinion.

Some services / websites might not have a good favicon (or one at all). I know Authy has a terrible icon selector since you are required to use their dumb "search" engine that doesn't give good results depending on the service.

The only concern I'd see is that the images would inflate the size of the vault if they're too big. Perhaps supplying one on the device would be good enough, but that also means that they'd have to be included in the vault or just left out, kinda.

kzshantonu commented 1 year ago

Just let us use these 2 beautiful packs and we'll be set for a long time to come:

https://github.com/aegis-icons/aegis-icons

https://github.com/alexbakker/aegis-simple-icons

I just don't understand the reluctance to let us use custom icons

milianw commented 1 year ago

How come this was closed, was this implemented finally? If so, can someone tell me how to set a custom icon in the current version - I cannot seem to be able to find that functionality.

Thanks

2fas-com commented 1 year ago

Sorry, closed by mistake... Icons issue is more complex (due to proper usage of brand symbols - we're legally responsible for what is used in our app). For now we're building our own icons pack. In addition to that - our pack contains not only images but also issuers (exact or with regexp, or label if service do not provide issuer) - so that icons are added to tokens automatically right after adding new token/service to our app. If you'd like to help us building our icons set - join our Discord server ✌️ The team behind the icons is growing 💪

kzshantonu commented 1 year ago

Not a lawyer. But I'm pretty sure if you let users choose any PNG file from THEIR device to be shown in the app that is installed on THEIR device, you are not legally responsible. Don't have to distribute the icons inside the app

Lordmau5 commented 1 year ago

Not a lawyer. But I'm pretty sure if you let users choose any PNG file from THEIR device to be shown in the app that is installed on THEIR device, you are not legally responsible. Don't have to distribute the icons inside the app

I am under the same impression here. A lot of apps (whether they're 2FA apps or not) allow loading a custom image for things you add in them.

I'm not sure what the best way for this would be in regards to backups. Perhaps allow up to X kb in size so they can be included in the backups? Maybe just put in a path that when being imported is checked against but if it can't find the file it'll ignore it or similar?

A couple of options for sure

AkazaRenn commented 1 year ago

Not a lawyer. But I'm pretty sure if you let users choose any PNG file from THEIR device to be shown in the app that is installed on THEIR device, you are not legally responsible. Don't have to distribute the icons inside the app

I am under the same impression here. A lot of apps (whether they're 2FA apps or not) allow loading a custom image for things you add in them.

I'm not sure what the best way for this would be in regards to backups. Perhaps allow up to X kb in size so they can be included in the backups? Maybe just put in a path that when being imported is checked against but if it can't find the file it'll ignore it or similar?

A couple of options for sure

Using favicons makes it possible to not back up icons, just load & cache them on the go.

2fas-com commented 1 year ago

We need to brainstorm favicons idea. However, the issue is that most favicons are only 32px x 32px - we need at least 120px x 120px. We'll talk it through tho!

arpanghosh8453 commented 3 months ago

Hello, Thanks @2fas-com for this wonderful open-source app. I was just wondering if it is easier to give a custom icon option to the user like Aegis does. That way, the user can add any missing icon they want or replace it with their preferred one. This is the only feature I am missing while using this app. Screenshot below -

image

apexskier commented 3 months ago

Adding my vote to allowing adding the site's address to pull icons from. Yes, favicons are traditionally too small, but it could fetch apple-touch-icon's which are much larger or the icon link, which is also often large enough. https://github.com/will-lumley/FaviconFinder looks like a promising solution for this for the iOS app.

https://gist.github.com/kevinSuttle/9835773

This could also be a "best effort" approach that pulls in the icon and only uses it if it is large enough.