bitwarden / authenticator-android

Bitwarden Authenticator mobile app for Android.
https://bitwarden.com
GNU General Public License v3.0
354 stars 24 forks source link

Authenticator return "Key is invalid." when typing key provided by Samsung account #141

Open th1nhhdk opened 4 months ago

th1nhhdk commented 4 months ago

Steps To Reproduce

  1. Go to 'Add item'
  2. Click on 'Enter key manually.'
  3. Type key (key format is "abcd abcd abcd abcd")
  4. Click on 'Add code'

Expected Result

Works like in "Microsoft Authenticator"

Actual Result

It returns "Key is invalid."

Screenshots or Videos

No response

Additional Context

No response

Build Version

2024.6.2 (340)

Environment Details

Issue Tracking Info

HeyITGuyFixIt commented 2 months ago

I just encountered this exact issue when attempting to add a key (copy and paste) from Notesnook. My device is a Google Pixel 6a running stock Android 14.

tixsys commented 1 month ago

Went here to report same. To solve u need to remove spaces. And bitwarsen should do it automatically

HeyITGuyFixIt commented 1 month ago

@tixsys at least with notesnook, it still says invalid key after removing the spaces.

Cryptnym commented 1 month ago

Im getting the same issue trying to add a gmail account, i tried removing the spaces but still get "key is invalid"

SaintPatrck commented 1 month ago

Hi all,

Thank you for reporting your issue. We use strict Base32 validation when manually entering keys. Spaces, lower-case letters, and other non-base32 characters will cause validation to fail. When displaying keys for manual entry, many applications may use lower-case letters or include spaces. I suggest double checking the code you entered contains only valid Base32 characters.

FYI; validation rules were relaxed to ignore spaces in a recent commit, but lower-case letters are still considered invalid. That change will be published soon.