/google-authenticator-export-code

Get the Google-Authenticator code in realtime with few steps.

Extract Google-Authenticator code from the Chrome extension

You may need to use a Google-Authenticator OTP for applications, you can achieve this by exporting the QR-code from the extension, reading the secrets info hidden into it and finally using the same algorithm used to produce the code in order to make a "copy".

  • In the Google-Authenticator Chrome extension, click on the QR-code icon in order to display it. Then, right click on the image and click "inspect" to open the element examinator.
  • Copy the content of the image in an editor, then select all the content between "base64," to "==". Be careful, "==" needs to be present in the selection.

{
  "username": "secret key"
}
  • Run the Python script.
>>> python2 google-authenticator.py
tristan_bilot:	193188 # <<- your OTP code