Skip to content

trivial implementation of TOTP in javascript using the browser's crypto API

License

Notifications You must be signed in to change notification settings

turistu/totp-in-javascript

Repository files navigation

This is a javascript implementation of a TOTP generator, using the browser's crypto API. It should do the exactly same thing as the google authenticator or any other TOTP generating app.

The javascript code does not send to or fetch any data from anywhere remotely, and the demo page should work the same when served over https, saved locally or used inside a browser extension.

I have also packaged this into an xpi firefox browser extension, which offers the convenience of generating the TOTP (for a key you have saved) directly from a toolbar popup instead of having to switch to another tab. The xpi does not do anything more than that and does not include any content scripts or filters.