- A tru.ID Account
- A Firebase Account
- A mobile phone with a SIM card and mobile data connection
Clone the repo:
git clone https://github.com/tru-ID/firebase-phone-auth-sim-swap-detection-android.git
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
Install the tru.ID CLI development server plugin
Create a new tru.ID project within the root directory via:
tru projects:create firebase-android --project-dir .
Run the development server, pointing it to the directly containing the newly created project configuration. This will also open up a ngrok to your development server making it publicly accessible to the Internet so that your mobile phone can access it when only connected to mobile data.
tru server -t --project-dir .
This project uses Firebase Android. To set it up, head over to the official documentation
You will get a Ngrok URL in the form https://{subdomain}.{region}.ngrok.io
.
Open the project up in your Android capable IDE, navigate to app/src/main/java/com/example/firebaseandroid/api/retrofit/RetrofitService.kt
here and replace the value of base_url
with the Ngrok URL.
Finally, connect your phone to your computer so it's used for running the Android project and run the application from your IDE.
Distributed under the MIT License. See LICENSE