Welcome to the world of enhanced security! In this article, we’ll guide you through the setup and utilization of the ADAMANT 2FA Demo Application. This innovative service is designed to deliver one-time passwords (OTPs) to your ADAMANT Messenger account, serving as a cheaper, more secure, and reliable alternative to traditional SMS.
What is ADAMANT 2FA?
ADAMANT 2FA is a service aimed at providing additional security for your ADAMANT Messenger account by delivering OTPs. Its advantages over SMS include cost-effectiveness and heightened reliability.
- More secure compared to SMS
- Cheaper operational costs
- Reliable delivery of one-time passwords
For further insights, check out the ADAMANT 2FA advantages.
Prerequisites
- PostgreSQL installed on your machine
Setup Guide
Here’s how to set up your ADAMANT 2FA application:
- Clone the repository and install dependencies:
git clone https://github.com/Adamant-im/adamant-2fa.git
cd adamant-2fa
npm install
cd client
yarn install
cd ..
sudo -u postgres psql
postgres=# CREATE USER adamant-2fa WITH PASSWORD 'password';
postgres=# CREATE DATABASE adamant-2fa WITH OWNER adamant-2fa;
postgres=# SHOW hba_file;
sudo nano /usr/local/var/postgresql/pg_hba.conf
# Add the following line:
local adamant-2fa adamant-2fa md5
sudo service postgresql restart
Configuration Steps
Next, create tables for Loopback models:
cd server
node create-lb-tables.js
cd ..
Set up your ADAMANT passphrase to send 2FA codes:
cp config.default.json config.json
nano config.json
Enter your ADM passphrase into the passPhrase field in the config.json file. Ensure that this account has sufficient ADM to send messages with 2FA codes. If you’re unsure how to create an ADM account, follow this guide on creating ADM account and getting free tokens.
Launching the Application
You can run the application in different modes:
- Serve in Development Mode:
node .
cd client
yarn serve
cd client
yarn build
yarn serve-build
pm2 start ./server/server.js --name 2fa-demo-server
pm2 start ./client/server.js --name 2fa-demo-client
Connecting ADAMANT 2FA to Your Service
If you have a service (such as an email provider, exchange, or any financial interface) and wish to enhance user security via 2FA, simply clone this project and make necessary modifications to the client and server components. For detailed instructions, refer to this article on how to connect ADAMANT 2FA to your business.
Troubleshooting
Should you encounter issues while setting up or using ADAMANT 2FA, consider the following troubleshooting tips:
- If the app does not send 2FA codes, the debug console may show success: false and errorMessage: Wrong passPhrase parameter. Make sure you have created
config.json
in the root directory (wherepackage.json
is located) and correctly set thepassPhrase
andnetwork
parameters. - Ensure the ADAMANT console tool does not have conflicting configurations; it should be set to mainnet with the correct passphrase.
- Familiarize yourself with logging functionalities to track down conditions within your application more effectively.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Final Thoughts
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.