This project serves as a guide to help you build a 2FA (Two-Factor Authentication) application with FreeClimb.
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
We offer a Two-Factor Authentication (2FA) how-to guide for more detailed set-up instructions and explanation of how the code in this 2FA sample app works.
A registered application with a named alias
A configured FreeClimb number assigned to your application
Trial accounts: a verified number
Tools:
-
Install the required packages
yarn install
-
Create a .env file and configure the following environment variables within it:
ENV VARIABLE DESCRIPTION ACCOUNT_ID Account ID which can be found under API credentials in dashboard. API_KEY Authentication token which can be found under API credentials 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).
-
Start the app
yarn start
If you would like to give the team feedback or you encounter a problem, please contact support or submit a ticket in the dashboard.