- A tru.ID Account
- A mobile phone with a SIM card and mobile data connection
- A Firebase Account
Clone the starter-files branch via:
git clone -b starter-files --single-branch https://github.com/tru-ID/firebase-phone-auth-sim-swap-detection-flutter.git
If you're only interested in the finished code in main then run:
git clone -b main https://github.com/tru-ID/firebase-phone-auth-sim-swap-detection-flutter.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-auth-flutter --project-dir .
If you want to create a tru.ID project with Sandbox mode enabled for testing, run:
tru projects:create firebase-auth-flutter --mode sandbox --project-dir
Read more about Sandbox mode here.
Run the development server, pointing it to the directory 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
This project uses FlutterFire which is a set of Flutter plugins which connect your Flutter application to Firebase. To get your project up and running check out the overview guide and how to get setup for Android, iOS and Authentication Setup.
NOTE Flutter with null safety is preferred.
To start the project, ensure you have a physical device connected then run:
flutter run
Note For a physical iOS device ensure you've provisioned your project in XCode
Distributed under the MIT License. See LICENSE