Skip to content

activout/bankid-demo-flutter-firebase

Repository files navigation

BankID in Flutter demo - Firebase functions version

Current status: proof-of-concept

Compatible backend using Firebase functions: activout/bankid-demo-backend-firebase

Code to launch BankID app:

final client = BankIdFirebaseClient();

final response = await client.auth();

var url = 'https://app.bankid.com/?autostarttoken=${response.autoStartToken}&redirect=null';
if (!await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication)) {
  throw Exception('Could not launch $url');
}

Setup

Setup a Firebase project and enable billing.

Follow the instructions in the Add Firebase to your Flutter app.

This will generate the following files that currently are listed in .gitignore so that I don't accidentally commit them to the repository:

  • android/app/google-services.json
  • ios/Runner/GoogleService-Info.plist
  • ios/firebase_app_id_file.json
  • lib/firebase_options.dart

TODO

  • Make /collect create a Firebase Auth custom token

See also

Need help implementing BankID?

Contact david@activout.se to order a support package.

License

MIT License.

About

Flutter & Firebase frontend for BankID demo (Android/iOS)

Resources

License

Stars

Watchers

Forks

Languages