Skip to content

A browser extension to retrieve 2FA security codes generated from your 2FAuth server

License

Notifications You must be signed in to change notification settings

Bubka/2FAuth-WebExtension

Repository files navigation

2FAuth-Browser-Extension

A web extension for retrieving 2FA codes generated by your 2FAuth server from your browser toolbar.

Note

2FAuth is a web app for managing your Two-Factor Authentication (2FA) accounts and generating their security codes.

🔗 2FAuth repository
🔗 2FAuth docs

Current features of the extension

  • Bind your 2FAuth user account (using a Personal Access Token) and retreive your 2FA data and groups
  • Retrieve user preferences on binding to avoid setting preferences from scratch (no synchronization afterwards)
  • Get fresh TOTP & HOTP codes from your 2FAuth server
  • Search in 2FA accounts & Browse groups
  • Protect access to your 2FA data with an extension specific password

Installation

From official stores

🔗 Mozilla Add-On store
🔗 Chrome Extension store

From Github releases

You can download installation resources for both Firefox and Chrome browsers (zip, xpi, crx) from the release page.
Once downloaded, open the extension manager of your browser and drop the downloaded file to install the extension.

Development

Requirements

Install js dependencies

npm install

Dev env

The extension uses the WXT web extension framework. It allows Hot Module Replacement (HMR), cross-browser compatibility for the manifest file, automatic browser startup and more.

Simply run npm run dev in a terminal to launch a new browser (default is Chrome) and start working on the extension code. See package.json scripts section for other available commands.

Custom browser binaries

You can specify the browser binaries to run during dev. Rename web-ext.config.ts.template to web-ext.config.ts and edit the file to your needs.

Enable vue devTools

The standalone @vue/devtools app comes as an npm dev dependency. Run ./node_modules/.bin/vue-devtools in a terminal to start it. The app is configured to listen for the extension pop-up and automatically connect to it when it opens.

Build commands

# Build Chrome distribution version
npm run build

# Build Firefox distribution version
npm run build:firefox

Build output dir is /dist/

Contributing

Important

Please do not open any issue or discussion in this repository, use the 2FAuth repository.

You can contribute to 2FAuth and this web extension in many ways:

Derivative work

This extension's service worker is a modified version of the one created by @Josh Gaby for his 2FAuth browser extension.

License

AGPL-3.0