scito / extract_otp_secrets

Extract one time password (OTP) secrets from QR codes exported by two-factor authentication (2FA) apps such as "Google Authenticator". The exported QR codes from authentication apps can be captured by camera, read from images, or read from text files. The secrets can be exported to JSON or CSV, or printed as QR codes to console.
https://scito.ch/content/extract-secret-keys-google-authenticator-qr-export
GNU General Public License v3.0
1.14k stars 137 forks source link

GUI Mode Working in Terminal on macOS (with Camera Access Prompt) #283

Closed haoruizhou closed 4 weeks ago

haoruizhou commented 1 month ago

Issue: GUI Mode Working in Terminal on macOS (with Camera Access Prompt)

Description:
I am providing this remark that the GUI mode does work in Terminal, but requires additional steps for camera access.

Tested Version:
extract_otp_secrets_2.8.1_macos_x86_64 on macOS Sequoia 15.1 beta.

Steps to Reproduce:

  1. Run the program in Terminal for the first time.
  2. Wait approximately 30 seconds - 1 minute on the first run. Terminal will display the following error:
    OpenCV: not authorized to capture video (status 0), requesting...
    OpenCV: camera failed to properly initialize!
  3. macOS will then prompt to request camera access.
  4. After allowing camera access, rerun the program.
  5. On the second run, the GUI prompt shows correctly and is fully operable.

Additional Context:

This is in response to the reported issue:

"⚠️ It seems the GUI mode is not working in Terminal on macOS. In tests no GUI window was opened. (Remarks and hints about macOS are welcome since I do not know macOS.)"

It appears that the issue is related to camera access permissions in macOS, and once allowed, the GUI functions as expected.

scito commented 4 weeks ago

Thanks for the contribution!