Before you begin you'll need the following:
- Android capable IDE (Android Studio recommended)
- A tru.ID account
- An Android phone with mobile data connection
- Node.js
Clone the starter-files branch via:
git clone -b starter-files --single-branch https://github.com/tru-ID/android-passwordless-auth.gitIf 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.gitCreate 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-androidRun 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-androidYou 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.
The images used from:
- https://www.flaticon.com/authors/google
- https://www.freepik.com
- https://www.flaticon.com/search?search-type=icons
Distributed under the MIT License. See LICENSE