Twilio Authy Configuration in Grails/Gradle application
I am going to start a blog series on Authy (Best Rated 2FA (Two-Factor Authentication) App) using Twilio (Build software that communicates with everyone in the world). But before this, let’s see how to configure them in your application.
Go to authy-java git repository and clone/download it. Run the following command to generate authy-java.jar jar as given in the README.md file in the repository.
Put this jar file in lib folder in the root folder of your project and add this in the dependency section in the build.gradle file.
Add Twilio dependency in the build.gradle file.
Keep these keys in a common place like application.groovy or application.yml for easy management.
I have put them in my application.groovy file —
authy.accountSID = "MyAccountSID"
authy.authToken = "MyAuthToken"
authy.fromPhoneNumber = "MyPhoneNumber"
authy.apiKey = "MyApiKey"
That’s all you need to configure. In my next blog, we will see how to implement two-factor authentication via SMS.