Node.js
Create a New Android Project
In this part, we will build a modern Android application that uses Jetpack Compose for the UI and integrates with the Vonage Verify API for 2FA (Two-Factor Authentication).
Overview
The application will follow this flow:
- User enters their phone number.
- App sends the phone number to the backend for verification.
- If Silent Authentication is successful, the user is verified.
- If it fails, the app prompts the user to enter the SMS code.
- The app submits the code for verification.
- The user is notified of the verification result.
Create the Android Project
- Open Android Studio.
- Click New Project → Empty Compose Activity.
- Set the following:
Name: Verify2FADemo
Language: Kotlin
Minimum SDK: API 24 (Android 5.0)
- Click Finish and wait for the project to build.
Getting Started with Silent Authentication
Silent Authentication takes quite a bit to understand. This tutorial shows you how to build an integration from scratch with Nodejs and Kotlin
Available on:
Steps
1
Introduction2
Before you start3
Initialize the Project4
Create a Simple Express Server5
Setting up Vonage credentials6
Add the Vonage Verify API7
Testing the Backend8
Create New Android Project9
Set up app Android dependencies10
Set up import and constants11
Create Mobile UI12
Networking to Backend13
Testing Full Flow