Adding SIM Swap Detection to your Web App's 2FA Login Flow with MessageBird Verify & tru.ID SIMCheck API
The requirements for this project are:
This project uses MessageBird's verify-guide as the base in the starter-files branch.
Clone the starter-files branch via:
git clone -b starter-files --single-branch https://github.com/tru-ID/2fa-sim-swap-detection-messagebird.git
If you're only interested in the finished code in main then run:
git clone -b main https://github.com/tru-ID/2fa-sim-swap-detection-messagebird.git
Next you need to configure MessageBird's credentials
Copy the values of example.env into a .env file via:
cd 2fa-sim-swap-detection-messagebird && cp example.env .env
Open the .env file and configure the following values:
MESSAGEBIRD_API_KEY: Your MessageBird API Key Found on your dashboard
Next, Create a tru.ID Account
Install the tru.ID CLI via:
npm i -g @tru_id/cli
Input your tru.ID credentials which can be found within the tru.ID console
Create a new tru.ID project via:
tru projects:create 2fa-with-messagebird
configure the following values in your .env:
TRU_ID_CLIENT: The client ID found in thetru.jsonfile in the newly created tru.ID project.TRU_ID_SECRET: The client secret found in thetru.jsonfile in the newly created tru.ID project.
In order to restore dependencies run:
npm installIn order to start the project run:
npm startDistributed under the MIT License. See LICENSE