DEV Community

David Sauro
David Sauro

Posted on

Get OTP secrets out of Authy and into 1password

For a while now I have been trying to figure out how to pull my "secrets" out of Authy (a one time code generator) and import them into 1password.

After a bit of Google-ing I found a post from Guillaume Boudreau that got me 99 percent of the way there.

https://gist.github.com/gboudreau/94bb0c11a6209c82418d01a59d958c93

After following his instructions and executing the javascript code, I noticed that the "period" is hard coded to 10 seconds, and won't work for standard Google Auth codes, just for Authy specific codes.

After stepping through the code, it became clear that I could modify the period to generate the proper 6 digit codes.

I was about to write some conditional logic and noticed that John Chadwick / Yulian Kuncheff in the comments came to the same conclusion so I stole their snipped and dumped it into the sourced posted by Guillaume.

I executed the js and ran some tests and its working great.

Top comments (0)