Authenticator-Extension / Authenticator

Authenticator generates 2-Step Verification codes in your browser.
https://authenticator.cc
MIT License
3.38k stars 792 forks source link

Adding new accounts with manual entry is broken #1262

Closed vinitha0708 closed 2 months ago

vinitha0708 commented 2 months ago

Describe the issue

while doing manual entry it's not showing the code

Browser

Chrome

Browser Version

127.0.6533.120

Extension Version

8.0.0

jooname commented 2 months ago

Adding further details as I'm also getting issues with manual entry. I have the same versions, so Chrome is 127.0.6533.120 (updated today) and the extension is 8.0.0. I did not have this issue earlier.

Problem: clicking ok on manual entry does nothing, so you cannot add new entries manually Expected: clicking ok should add new entry to the tool and start showing the codes

Replication steps:

  1. Open the tool from browser extensions as usual
  2. Click the pen icon on top right
  3. Click the plus icon that appears
  4. Select manual entry
  5. Fill in issuer and secret
  6. Try to click OK

Right-clicking the tool does allow me to inspect it and there I can see following error coming up when you click OK:

TypeError: n.getEncryptionStatus is not a function
    at Rs.getOTPStorageFromEntry (storage.ts:214:39)
    at Rs.<anonymous> (storage.ts:562:26)
    at Generator.next (<anonymous>)
    at otp.ts:290:3
    at new Promise (<anonymous>)
    at Is (otp.ts:290:3)
    at Rs.add (storage.ts:560:20)
    at Ds.<anonymous> (otp.ts:167:24)
    at Generator.next (<anonymous>)
    at otp.ts:27:13

As far as I could see the issuer and secret values made no difference and modifying the advanced settings also made no difference.

mymindstorm commented 2 months ago

Thanks for the report! As a workaround, you should be able to do a text backup import using the string otpauth://totp/?secret=[your secret here, no whitespace]

Sneezry commented 2 months ago

@mymindstorm is this a regression? I took a quick look but haven't yet identified the root cause.

mymindstorm commented 2 months ago

Think so but can't investigate until Sunday

Sneezry commented 2 months ago

No worry. I will take a look first.

Sneezry commented 2 months ago

The root cause is we store encryption map in state, but use it as encryption.

https://github.com/Authenticator-Extension/Authenticator/blob/dev/src/definitions/module-interface.d.ts#L64

https://github.com/Authenticator-Extension/Authenticator/blob/dev/src/models/otp.ts#L91

https://github.com/Authenticator-Extension/Authenticator/blob/dev/src/components/Popup/AddAccountPage.vue#L131

Data stored in state:

{
  [key-hash]: EncryptionInterface
}

But use it as EncryptionInterface

landmark3138 commented 2 months ago

I tried with chrome, edge, firefox and brave; none worked

Sneezry commented 2 months ago

Hotfix has been submitted to Google

@mymindstorm could you help to submit v8.0.1 to Mozilla and Microsoft, thanks.

cipineda commented 2 months ago

It seems version 8.0.1 fixed this issue, is there a way to upgrade existing the extension (version 8.0.0) to 8.0.1? I tried removing the extension and re-installing from https://authenticator.cc but still get version 8.0.0.

mymindstorm commented 2 months ago

@cipineda I submitted the update to Microsoft, but it is pending review.