This project serves as a guide to help you build a 2FA (Two-Factor Authentication) application with FreeClimb. View this tutorial here.
Specifically, the project will:
- Get a phone number from the user
- Send a verification code to the user's phone
- Get the verification code from the user
- Expire the verification code after a set amount of time
- Verify the code
To get started using a FreeClimb account, follow the instructions here.
-
Install the required packages
yarn install
-
Configure environment variables within the .env file
ENV VARIABLE DESCRIPTION ACCOUNT_ID Account ID which can be found under API Keys in Dashboard. AUTH_TOKEN Authentication token which can be found under API Keys in Dashboard FC_PHONE_NUMBER A configured FreeClimb Number that will send verification codes. To learn more, go here. PORT Specifies the port on which the app will run (e.g. PORT=3000 means you would direct your browser to http://localhost:3000).
yarn start