Skip to content

tru-ID/passwordless-auth-android

Repository files navigation

Passwordless Mobile Authentication with Android

Requirements

Before you begin you'll need the following:

Getting Started

Clone the starter-files branch via:

git clone -b starter-files --single-branch https://github.com/tru-ID/android-passwordless-auth.git

If you're only interested in the finished code in main then run:

git clone -b main --single-branch https://github.com/tru-ID/android-passwordless-auth.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 passwordless-auth-android

Run the development server, pointing it to the directly containing the newly created project configuration. This will also open up a localtunnel 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 ./passwordless-auth-android

You will get a localtunnel URL in the form https://{subdomain}.loca.lt

Open the project up in your Android capable IDE, navigate to app/src/main/java/com/example/tru_phonecheck/api/retrofit/RetrofitService.kt here and replace the value of base_url with the localtunnel URL. Finally, connect your phone to your computer so it's used for running the Android project and run the application from your IDE.

Attribution

The images used from:

Meta

Distributed under the MIT License. See LICENSE

tru.ID