Home

Awesome

<h1 align="center">2FA Directory - Frontend</h1> <p align="center"> <a href="https://twitter.com/2faorg/"><img src="https://img.shields.io/badge/X/Twitter-@2faorg-1DA1F2.svg?style=for-the-badge&logo=x"/></a> <a href="https://infosec.exchange/@2factorauth"><img src="https://img.shields.io/badge/Mastodon-@2factorauth-6364FF?style=for-the-badge&logo=mastodon"/></a> <a href="https://github.com/sponsors/2factorauth/"><img src="https://img.shields.io/github/sponsors/2factorauth?color=db61a2&logo=GitHub&style=for-the-badge"/></a> </p>

<strong>2FA Directory is an open-source project that aims to improve online security by providing a directory of websites and services that support two-factor authentication (2FA). Our community-driven platform allows anyone to contribute to the list, making it the most comprehensive directory of its kind.</strong>

This repository contains the HTML, JavaScript and CSS for 2fa.directory.
All data used to populate the categories is sourced from 2factorauth/twofactorauth.

Tech Stack

Local Installation

To run the site locally, follow these steps:

  1. Ensure you have Node.js installed (Recommended version: 20.x or higher).
  2. Clone the repository:
    git clone https://github.com/2factorauth/2fa.directory.git
    cd frontend
    
  3. Install NPM packages:
    npm install
    
  4. Run the site locally:
    npm run dev
    
    After running this command, the site will be accessible at http://localhost:5173 (or another port if 5173 is taken).

[!NOTE] The region-redirection script does not run locally. You will therefore always be directed to the international page when using npm run dev.

Publishing forks

If you’d like to deploy your own version of this site, you can use Cloudflare Pages to host it. Here’s how you can publish a fork of this repository:

  1. Log in to your Cloudflare Dashboard and select "Pages."
  2. Create a new project and select your fork as the source.
  3. Configure the build settings:
    • Framework preset: None
    • Build command: npm run build
    • Build output directory: dist
  4. Deploy your project. Once completed, your site will be live on Cloudflare Pages.

[!TIP] Be sure to update the fork with any new changes from the main repository to keep your version up-to-date.

Contributing

When contributing changes to this repository, please make sure your IDE follows our editorconfig.

The general file structure is as follows:

TypePath
JavaScriptsrc
CSSassets/css
Layout componentssrc/components
Translationsdata/languages.json

License

This project is licensed under the GPLv3. See LICENSE for the full text.

Before you make changes to the code, please keep the following in mind:

For more details on what is and isn't allowed under a GPLv3 license, see this guide.