This is a project on Multi-factor Authentication System. We have an android application and a simple website (NOTE: this site may not work anymore, Heroku might have stopped hosting it). You can register an account from the website and select one of the three Authentication options - Time-based One Time Password (TOTP) verification, or Fingerprint verification, or both - which you can use alongside Password verification during login. The android application generates TOTP and verifies fingerprint.
The Android application was built for Android 7 and above.
These instructions are for getting a copy of the project running on your machine for development and testing.
These should be globally installed:
npm install -g typescript
npm install -g ts-node
Create a file called .env
in the server
folder and copy the contents below. Generate public and private keys using RSA key generator and also create a MongoDB cluster using MongoDB Atlas, replace them to their respective places. The contents of the .env
file:
DB_URI = '<ENTER_YOUR_MONGODB_URI_HERE>'
PORT = 5000
HOST = 'localhost'
PRIVATE_KEY = '<ENTER_YOUR_PRIVATE_KEY_HERE>'
PUBLIC_KEY = '<ENTER_YOUR_PUBLIC_KEY_HERE>'
(Type these commands by opening the command prompt (for Windows) in the root directory of this repository.)
cd server
npm install
cd ../app
flutter pub get
OR (for Windows),
./install.bat
(Type these commands by opening the command prompt (for Windows) in the root directory of this repository.)
src/server/app.ts
). This will directly run the typescript files without building javascript files.
cd server
npm run server
OR (for Windows),
./server.bat
http://localhost:5000
.OR,
cd server
npm run build
npm run server-js
OR (for Windows),
./server-build.bat
http://localhost:5000
.Warning! In .pub-cache\hosted\pub.dartlang.org\flutter_barcode_scanner-2.0.0\android\src\main\java\com\amolg\flutterbarcodescanner\FlutterBarcodeScannerPlugin.java replace all references of FlutterActivity to FlutterFragmentActivity. This is because the local_auth package uses FlutterFragmentActivity and flutter_barcode_scanner uses FlutterActivity.
Create and open an Android Virtual Device (AVD) in Android Studio.
OR, you can also configure USB Debugging.
(Type these commands by opening the command prompt (for Windows) in the root directory of this repository.)
Build and run the project using the following command:
cd app
flutter run
OR (for Windows),
./app.bat
OR, use vscode flutter extension.
Build and run the app in release mode
cd app
flutter run --release
OR (for Windows),
./app-rel.bat
You can also clean (deleting build files and other generated files) the flutter project using the following command.
cd app
flutter clean
OR (for Windows)
./app-clean.bat
Home page\
Fingerprint verification\
QR code scan page\
multifa.herokuapp.com/register
\
multifa.herokuapp.com/login
\