How to Add SIM Card Based Mobile Authentication to your Android App with tru.ID.
You will need:
- Android capable IDE e.g. Android Studio
- A tru.ID Account
- An Android phone with a SIM card and mobile data connection
Install the tru.ID CLI and set it up using the command provided in the tru.ID console:
$ tru setup:credentials {client_id} {client_secret} {data_residency}
Install the development server plugin:
$ tru plugins:install @tru_id/cli-plugin-dev-server@canary
Create a tru.ID project:
$ tru projects:create authsome-android
Run the development server and take a note of the local tunnel URL:
$ tru server --project-dir ./authsome-android
Clone or this repo:
$ git clone git@github.com:tru-ID/sim-card-auth-android.git
Open the project with your Android Capable IDE.
Create a file app/tru-id.properties
in your project and add configuration to identify the local tunnel URL of the development server:
EXAMPLE_SERVER_BASE_URL="https://example.com"
Connect your phone to your computer so it's used for running the application and run the application from your IDE.
Enter the phone number for the mobile device in the UI in the format +{country_code}{number} e.g. +447900123456
. Press the done keyboard key or touch the "Verify my phone number" button and you will see the result of the check.
Get in touch: please email feedback@tru.id with any questions.
Distributed under the MIT license. See LICENSE for more information.