A serverless web application that generates TOTP and HOTP codes, enabling robust two-factor authentication (2FA) directly within your browser.
See the live demo:
- Credentials:
admin
-Admin@123$
๐ Serverless: Leverages complete edge support, eliminating the need to maintain a server. You can deploy this project on your Cloudflare account for Free
.
โ๏ธ Compatibility: MyAuthenticator supports TOTP
(Time-Based One-Time Password) and HOTP
(HMAC-Based One-Time Password), which are widely used by most services for two-factor authentication.
โ๏ธ Theming: Offers light and dark themes, with customizable accent colors.
๐ซ Icons: Includes 100+ colored icons and access to 3000+ icons from SimpleIcons, all are in SVG
format for scalability.
๐ Secure: Uses nuxt-auth-utils
for authentication and encrypts database fields for enhanced security.
๐๏ธ Backup / Restore: Securely backup and restore authenticators with encryption. Supports import from and export to Google Authenticator
.
๐ค Telegram Bot and MiniApp: You can use this web app as a Telegram miniapp within the Telegram app.
# required
NUXT_SESSION_PASSWORD="your-super-long-secret-for-session-encryption"
NUXT_AUTH_USERNAME="admin"
NUXT_AUTH_PASSWORD="Admin@123$"
# optional
NUXT_DB_ENCRYPTION_PASSWORD="your-super-long-secret-for-db-encryption"
NUXT_TELEGRAM_BOT_TOKEN="12345678:AAEzFGO9ME4i7hV9gfPTgAcJABCDEFG"
NUXT_TELEGRAM_USERID="874962691"
-
NUXT_SESSION_PASSWORD
: This password is used bynuxt-auth-utils
to secure your session. It must be at least 32 characters long. -
NUXT_AUTH_USERNAME
: The username for authentication. It must be at least 5 characters long. -
NUXT_AUTH_PASSWORD
: The password for authentication. It must be at least 8 characters long and include:- One uppercase letter
- One digit
- One lowercase letter
- Two special characters
-
NUXT_DB_ENCRYPTION_PASSWORD
: This password is used to encrypt and decrypt the database field ofsecretkey
. By default, no encryption is used for data stored in the database. You can enable encryption by setting this variable. It must be exactly 32 characters long. -
NUXT_TELEGRAM_BOT_TOKEN
: This is the Bot Token for the Telegram Bot, which can be obtained from @BotFather. Required for using this web app as a Telegram miniapp. -
NUXT_TELEGRAM_USERID
: This is your Telegram User ID used to identify you as a user of the bot. Obtain it from @MissRose_bot using the/info
command. Required for using this web app as a Telegram miniapp.
Note
This project is currently under testing and improvements. Please back up your data before proceeding.
You can deploy this project on your Cloudflare account for free and with zero configuration using NuxtHub You can use either the NuxtHub CLI or the NuxtHub Admin Web UI.
-
First, clone this repository.
-
Follow this guide and create
.env
file and add necessary environment variables
npx nuxthub deploy
- Once you deployed your project, apply migrations in production with:
npx nuxi dev --remote
-
That's it, you've created your own authenticator.
-
You can set up your Telegram bot at https://< yourapp >.pages.dev/telegram
- First, fork this repository.
- Open the NuxtHub Admin
- Click on
New Project
then Import aGitHub repository
- Select your Github repository
- Click on
Import repository
- Add the necessary environment variables
- After deploying, go to your project dashboard and create a table in the database by running the following SQL query in the
SQL runner
:
CREATE TABLE `accounts` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`type` text NOT NULL,
`issuer` text NOT NULL,
`label` text NOT NULL,
`secret` text NOT NULL,
`algorithm` text NOT NULL,
`digits` integer NOT NULL,
`period` integer NOT NULL,
`counter` integer NOT NULL,
`icon` text NOT NULL,
`icontype` text NOT NULL,
`createdAt` text DEFAULT (current_timestamp) NOT NULL
);
- That's it, you've created your own authenticator.
- You can set up your Telegram bot at https://< yourapp >.pages.dev/telegram
Feel free to contribute to this project with your ideas and improvements. Your feedback and suggestions are highly valued and will help enhance this project further.
MyAuthenticator is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.