Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

add flutter mfa example app

dshukertjr16cad2276585
diff --git a/examples/auth/flutter-mfa/.gitignore b/examples/auth/flutter-mfa/.gitignore
new file mode 100644
index 00000000000..c39a7b5a271
--- /dev/null
+++ b/examples/auth/flutter-mfa/.gitignore
@@ -0,0 +1,46 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
+
+pubspec.lock
diff --git a/examples/auth/flutter-mfa/README.md b/examples/auth/flutter-mfa/README.md
new file mode 100644
index 00000000000..abcb23dab84
--- /dev/null
+++ b/examples/auth/flutter-mfa/README.md
@@ -0,0 +1,29 @@
+# Flutter Supabase MFA Example
+
+A simple app demonstrating how to implement Multi-Factor Authentication (MFA) with Supabase and Flutter.
+
+```sql
+-- Dummy table that contains "secure" information
+create table if not exists public.private_posts (
+ id int generated by default as identity primary key,
+ content text not null
+);
+
+-- Dmmy "secure" data
+insert into public.private_posts
+ (content)
+values
+ ('Flutter is awesome!'),
+ ('Supabase is awesome!'),
+ ('Postgres is awesome!');
+
+-- Enable RLS for private_posts table
+alter table public.private_posts enable row level security;
+
+-- Create a policy that only allows read if they user has signed in via MFA
+create policy "Users can view private_posts if they have signed in via MFA"
+ on public.private_posts
+ for select
+ to authenticated
+ using (auth.jwt()->>'aal' = 'aal2');
+```
\ No newline at end of file
diff --git a/examples/auth/flutter-mfa/analysis_options.yaml b/examples/auth/flutter-mfa/analysis_options.yaml
new file mode 100644
index 00000000000..61b6c4de17c
--- /dev/null
+++ b/examples/auth/flutter-mfa/analysis_options.yaml
@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at
+ # https://dart-lang.github.io/linter/lints/index.html.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/examples/auth/flutter-mfa/android/.gitignore b/examples/auth/flutter-mfa/android/.gitignore
new file mode 100644
index 00000000000..6f568019d3c
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/examples/auth/flutter-mfa/android/app/build.gradle b/examples/auth/flutter-mfa/android/app/build.gradle
new file mode 100644
index 00000000000..abc6fa8f0d4
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/build.gradle
@@ -0,0 +1,71 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion flutter.compileSdkVersion
+ ndkVersion flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.mfa_app"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}
diff --git a/examples/auth/flutter-mfa/android/app/src/debug/AndroidManifest.xml b/examples/auth/flutter-mfa/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 00000000000..b491a43c032
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,8 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.mfa_app">
+ <!-- The INTERNET permission is required for development. Specifically,
+ the Flutter tool needs it to communicate with the running application
+ to allow setting breakpoints, to provide hot reload, etc.
+ -->
+ <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>
diff --git a/examples/auth/flutter-mfa/android/app/src/main/AndroidManifest.xml b/examples/auth/flutter-mfa/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000000..3535423451b
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,46 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.mfa_app">
+ <application
+ android:label="mfa_app"
+ android:name="${applicationName}"
+ android:icon="@mipmap/ic_launcher">
+ <activity
+ android:name=".MainActivity"
+ android:exported="true"
+ android:launchMode="singleTop"
+ android:theme="@style/LaunchTheme"
+ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
+ android:hardwareAccelerated="true"
+ android:windowSoftInputMode="adjustResize">
+ <!-- Specifies an Android theme to apply to this Activity as soon as
+ the Android process has started. This theme is visible to the user
+ while the Flutter UI initializes. After that, this theme continues
+ to determine the Window background behind the Flutter UI. -->
+ <meta-data
+ android:name="io.flutter.embedding.android.NormalTheme"
+ android:resource="@style/NormalTheme"
+ />
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+
+ <!-- Deep Links -->
+ <meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <data
+ android:scheme="mfa-app"
+ android:host="callback" />
+ </intent-filter>
+ <!-- END Deep Links -->
+ </activity>
+ <!-- Don't delete the meta-data below.
+ This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
+ <meta-data
+ android:name="flutterEmbedding"
+ android:value="2" />
+ </application>
+</manifest>
diff --git a/examples/auth/flutter-mfa/android/app/src/main/kotlin/com/example/mfa_app/MainActivity.kt b/examples/auth/flutter-mfa/android/app/src/main/kotlin/com/example/mfa_app/MainActivity.kt
new file mode 100644
index 00000000000..1db83963878
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/src/main/kotlin/com/example/mfa_app/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.mfa_app
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/auth/flutter-mfa/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 00000000000..f74085f3f6a
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="?android:colorBackground" />
+
+ <!-- You can insert your own image assets here -->
+ <!-- <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@mipmap/launch_image" />
+ </item> -->
+</layer-list>
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/drawable/launch_background.xml b/examples/auth/flutter-mfa/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 00000000000..304732f8842
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@android:color/white" />
+
+ <!-- You can insert your own image assets here -->
+ <!-- <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@mipmap/launch_image" />
+ </item> -->
+</layer-list>
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000000..db77bb4b7b0
Binary files /dev/null and b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000000..17987b79bb8
Binary files /dev/null and b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000000..09d4391482b
Binary files /dev/null and b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000000..d5f1c8d34e7
Binary files /dev/null and b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000000..4d6372eebdb
Binary files /dev/null and b/examples/auth/flutter-mfa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/values-night/styles.xml b/examples/auth/flutter-mfa/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 00000000000..06952be745f
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
+ <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+ <!-- Show a splash screen on the activity. Automatically removed when
+ the Flutter engine draws its first frame -->
+ <item name="android:windowBackground">@drawable/launch_background</item>
+ </style>
+ <!-- Theme applied to the Android Window as soon as the process has started.
+ This theme determines the color of the Android Window while your
+ Flutter UI initializes, as well as behind your Flutter UI while its
+ running.
+
+ This Theme is only used starting with V2 of Flutter's Android embedding. -->
+ <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
+ <item name="android:windowBackground">?android:colorBackground</item>
+ </style>
+</resources>
diff --git a/examples/auth/flutter-mfa/android/app/src/main/res/values/styles.xml b/examples/auth/flutter-mfa/android/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000000..cb1ef88056e
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
+ <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
+ <!-- Show a splash screen on the activity. Automatically removed when
+ the Flutter engine draws its first frame -->
+ <item name="android:windowBackground">@drawable/launch_background</item>
+ </style>
+ <!-- Theme applied to the Android Window as soon as the process has started.
+ This theme determines the color of the Android Window while your
+ Flutter UI initializes, as well as behind your Flutter UI while its
+ running.
+
+ This Theme is only used starting with V2 of Flutter's Android embedding. -->
+ <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
+ <item name="android:windowBackground">?android:colorBackground</item>
+ </style>
+</resources>
diff --git a/examples/auth/flutter-mfa/android/app/src/profile/AndroidManifest.xml b/examples/auth/flutter-mfa/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 00000000000..b491a43c032
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,8 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.mfa_app">
+ <!-- The INTERNET permission is required for development. Specifically,
+ the Flutter tool needs it to communicate with the running application
+ to allow setting breakpoints, to provide hot reload, etc.
+ -->
+ <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>
diff --git a/examples/auth/flutter-mfa/android/build.gradle b/examples/auth/flutter-mfa/android/build.gradle
new file mode 100644
index 00000000000..58a8c74b147
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ ext.kotlin_version = '1.7.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.2.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/examples/auth/flutter-mfa/android/gradle.properties b/examples/auth/flutter-mfa/android/gradle.properties
new file mode 100644
index 00000000000..94adc3a3f97
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/examples/auth/flutter-mfa/android/gradle/wrapper/gradle-wrapper.properties b/examples/auth/flutter-mfa/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000000..3c472b99c6f
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
diff --git a/examples/auth/flutter-mfa/android/settings.gradle b/examples/auth/flutter-mfa/android/settings.gradle
new file mode 100644
index 00000000000..44e62bcf06a
--- /dev/null
+++ b/examples/auth/flutter-mfa/android/settings.gradle
@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/examples/auth/flutter-mfa/ios/.gitignore b/examples/auth/flutter-mfa/ios/.gitignore
new file mode 100644
index 00000000000..7a7f9873ad7
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/examples/auth/flutter-mfa/ios/Flutter/AppFrameworkInfo.plist b/examples/auth/flutter-mfa/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 00000000000..9625e105df3
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>App</string>
+ <key>CFBundleIdentifier</key>
+ <string>io.flutter.flutter.app</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>App</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>MinimumOSVersion</key>
+ <string>11.0</string>
+</dict>
+</plist>
diff --git a/examples/auth/flutter-mfa/ios/Flutter/Debug.xcconfig b/examples/auth/flutter-mfa/ios/Flutter/Debug.xcconfig
new file mode 100644
index 00000000000..ec97fc6f302
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/examples/auth/flutter-mfa/ios/Flutter/Release.xcconfig b/examples/auth/flutter-mfa/ios/Flutter/Release.xcconfig
new file mode 100644
index 00000000000..c4855bfe200
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Flutter/Release.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/examples/auth/flutter-mfa/ios/Podfile b/examples/auth/flutter-mfa/ios/Podfile
new file mode 100644
index 00000000000..88359b225fa
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Podfile
@@ -0,0 +1,41 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '11.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+ use_modular_headers!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/examples/auth/flutter-mfa/ios/Podfile.lock b/examples/auth/flutter-mfa/ios/Podfile.lock
new file mode 100644
index 00000000000..6d81251b816
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Podfile.lock
@@ -0,0 +1,47 @@
+PODS:
+ - app_links (0.0.1):
+ - Flutter
+ - Flutter (1.0.0)
+ - path_provider_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - sign_in_with_apple (0.0.1):
+ - Flutter
+ - url_launcher_ios (0.0.1):
+ - Flutter
+ - webview_flutter_wkwebview (0.0.1):
+ - Flutter
+
+DEPENDENCIES:
+ - app_links (from `.symlinks/plugins/app_links/ios`)
+ - Flutter (from `Flutter`)
+ - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
+ - sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
+ - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
+ - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
+
+EXTERNAL SOURCES:
+ app_links:
+ :path: ".symlinks/plugins/app_links/ios"
+ Flutter:
+ :path: Flutter
+ path_provider_foundation:
+ :path: ".symlinks/plugins/path_provider_foundation/ios"
+ sign_in_with_apple:
+ :path: ".symlinks/plugins/sign_in_with_apple/ios"
+ url_launcher_ios:
+ :path: ".symlinks/plugins/url_launcher_ios/ios"
+ webview_flutter_wkwebview:
+ :path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
+
+SPEC CHECKSUMS:
+ app_links: ab4ba54d10a13d45825336bc9707b5eadee81191
+ Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
+ path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
+ sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
+ url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
+ webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
+
+PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
+
+COCOAPODS: 1.11.3
diff --git a/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.pbxproj b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 00000000000..4dc3538b300
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,554 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+ C58F27931800A710F1ED55BD /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E65A323812417A942D5923D /* Pods_Runner.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
+ 1E6FF45445258DA130A6AB56 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
+ 6369AE2ED102565F36ABECC7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 9E65A323812417A942D5923D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ A42A5566B4F3D0FC293BE708 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C58F27931800A710F1ED55BD /* Pods_Runner.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 4B1D317BFE26C01D92529645 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 6369AE2ED102565F36ABECC7 /* Pods-Runner.debug.xcconfig */,
+ A42A5566B4F3D0FC293BE708 /* Pods-Runner.release.xcconfig */,
+ 1E6FF45445258DA130A6AB56 /* Pods-Runner.profile.xcconfig */,
+ );
+ name = Pods;
+ path = Pods;
+ sourceTree = "<group>";
+ };
+ 6669F57AE1C3DED7B0B707BB /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 9E65A323812417A942D5923D /* Pods_Runner.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "<group>";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 4B1D317BFE26C01D92529645 /* Pods */,
+ 6669F57AE1C3DED7B0B707BB /* Frameworks */,
+ );
+ sourceTree = "<group>";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9B9305F77316C8A7DFFFD6FB /* [CP] Check Pods Manifest.lock */,
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ 0C31EF6C0E65A31D086988A3 /* [CP] Embed Pods Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1300;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 0C31EF6C0E65A31D086988A3 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+ 9B9305F77316C8A7DFFFD6FB /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "<group>";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = Z6UYZY8QU4;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.mfaApp;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = Z6UYZY8QU4;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.mfaApp;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = Z6UYZY8QU4;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.mfaApp;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000000..919434a6254
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:">
+ </FileRef>
+</Workspace>
diff --git a/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000000..18d981003d6
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEDidComputeMac32BitWarning</key>
+ <true/>
+</dict>
+</plist>
diff --git a/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 00000000000..f9b0d7c5ea1
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>PreviewsEnabled</key>
+ <false/>
+</dict>
+</plist>
diff --git a/examples/auth/flutter-mfa/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 00000000000..c87d15a3352
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1300"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Profile"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/examples/auth/flutter-mfa/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/auth/flutter-mfa/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000000..21a3cc14c74
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "group:Runner.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:Pods/Pods.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/examples/auth/flutter-mfa/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/auth/flutter-mfa/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000000..18d981003d6
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEDidComputeMac32BitWarning</key>
+ <true/>
+</dict>
+</plist>
diff --git a/examples/auth/flutter-mfa/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/auth/flutter-mfa/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 00000000000..f9b0d7c5ea1
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>PreviewsEnabled</key>
+ <false/>
+</dict>
+</plist>
diff --git a/examples/auth/flutter-mfa/ios/Runner/AppDelegate.swift b/examples/auth/flutter-mfa/ios/Runner/AppDelegate.swift
new file mode 100644
index 00000000000..70693e4a8c1
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 00000000000..d36b1fab2d9
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..dc9ada4725e
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..7353c41ecf9
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..797d452e458
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..6ed2d933e11
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..4cd7b0099ca
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..fe730945a01
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..321773cd857
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..797d452e458
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..502f463a9bc
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..0ec30343922
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..0ec30343922
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..e9f5fea27c7
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..84ac32ae7d9
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..8953cba0906
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 00000000000..0467bf12aa4
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 00000000000..0bedcf2fd46
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 00000000000..9da19eacad3
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
new file mode 100644
index 00000000000..9da19eacad3
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
new file mode 100644
index 00000000000..9da19eacad3
Binary files /dev/null and b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] differ
diff --git a/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 00000000000..89c2725b70f
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/examples/auth/flutter-mfa/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/auth/flutter-mfa/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 00000000000..f2e259c7c93
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+ <dependencies>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="EHf-IW-A2E">
+ <objects>
+ <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
+ <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+ </imageView>
+ </subviews>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <constraints>
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
+ </constraints>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="53" y="375"/>
+ </scene>
+ </scenes>
+ <resources>
+ <image name="LaunchImage" width="168" height="185"/>
+ </resources>
+</document>
diff --git a/examples/auth/flutter-mfa/ios/Runner/Base.lproj/Main.storyboard b/examples/auth/flutter-mfa/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 00000000000..f3c28516fb3
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+ <dependencies>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+ </dependencies>
+ <scenes>
+ <!--Flutter View Controller-->
+ <scene sceneID="tne-QT-ifu">
+ <objects>
+ <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+ <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+ <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+ </objects>
+ </scene>
+ </scenes>
+</document>
diff --git a/examples/auth/flutter-mfa/ios/Runner/Info.plist b/examples/auth/flutter-mfa/ios/Runner/Info.plist
new file mode 100644
index 00000000000..203cfd56dde
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner/Info.plist
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <key>CFBundleDisplayName</key>
+ <string>Mfa App</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>mfa_app</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>$(FLUTTER_BUILD_NAME)</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>$(FLUTTER_BUILD_NUMBER)</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UILaunchStoryboardName</key>
+ <string>LaunchScreen</string>
+ <key>UIMainStoryboardFile</key>
+ <string>Main</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UIViewControllerBasedStatusBarAppearance</key>
+ <false/>
+ <key>CADisableMinimumFrameDurationOnPhone</key>
+ <true/>
+ <key>UIApplicationSupportsIndirectInputEvents</key>
+ <true/>
+ <!-- Deep Links -->
+ <key>FlutterDeepLinkingEnabled</key>
+ <true/>
+ <key>CFBundleURLTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>mfa-app</string>
+ </array>
+ </dict>
+ </array>
+ <!-- Deep Links -->
+
+</dict>
+</plist>
diff --git a/examples/auth/flutter-mfa/ios/Runner/Runner-Bridging-Header.h b/examples/auth/flutter-mfa/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 00000000000..308a2a560b4
--- /dev/null
+++ b/examples/auth/flutter-mfa/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/examples/auth/flutter-mfa/lib/main.dart b/examples/auth/flutter-mfa/lib/main.dart
new file mode 100644
index 00000000000..b8eab901fe3
--- /dev/null
+++ b/examples/auth/flutter-mfa/lib/main.dart
@@ -0,0 +1,108 @@
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import 'package:mfa_app/pages/auth/login_page.dart';
+import 'package:mfa_app/pages/auth/register_page.dart';
+import 'package:mfa_app/pages/home_page.dart';
+import 'package:mfa_app/pages/list_mfa_page.dart';
+import 'package:mfa_app/pages/mfa/verify_page.dart';
+import 'package:supabase_flutter/supabase_flutter.dart';
+import 'package:mfa_app/pages/mfa/enroll_page.dart';
+
+void main() async {
+ await Supabase.initialize(
+ url: 'https://mmovxqiqcxyufdudlcnl.supabase.co',
+ anonKey:
+ 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1tb3Z4cWlxY3h5dWZkdWRsY25sIiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODMwMzYzMjIsImV4cCI6MTk5ODYxMjMyMn0.gJbycbKjVT0L4_csVRjyYBxnUU3X1ZCMwbxMi7962Rw',
+ );
+ runApp(const MyApp());
+}
+
+/// Extract SupabaseClient instance in a handy variable
+final supabase = Supabase.instance.client;
+
+final _router = GoRouter(
+ routes: [
+ GoRoute(
+ path: HomePage.route,
+ builder: (context, state) => const HomePage(),
+ ),
+ GoRoute(
+ path: ListMFAPage.route,
+ builder: (context, state) => ListMFAPage(),
+ ),
+ GoRoute(
+ path: LoginPage.route,
+ builder: (context, state) => const LoginPage(),
+ ),
+ GoRoute(
+ path: RegisterPage.route,
+ builder: (context, state) => const RegisterPage(),
+ ),
+ GoRoute(
+ path: MFAEnrollPage.route,
+ builder: (context, state) => const MFAEnrollPage(),
+ ),
+ GoRoute(
+ path: MFAVerifyPage.route,
+ builder: (context, state) => const MFAVerifyPage(),
+ ),
+ ],
+ redirect: (context, state) async {
+ // Any users can visit the /auth route
+ if (state.location.contains('/auth') == true) {
+ return null;
+ }
+
+ final session = supabase.auth.currentSession;
+ // A user without a session should be redirected to the register page
+ if (session == null) {
+ return RegisterPage.route;
+ }
+
+ // user with a session can visit /mfa route
+ if (state.location.contains('/mfa') == true) {
+ return null;
+ }
+
+ final assuranceLevelData =
+ supabase.auth.mfa.getAuthenticatorAssuranceLevel();
+
+ // The user has not setup MFA yet, so send them to enroll MFA page.
+ if (assuranceLevelData.currentLevel == AuthenticatorAssuranceLevels.aal1) {
+ await supabase.auth.refreshSession();
+ final nextLevel =
+ supabase.auth.mfa.getAuthenticatorAssuranceLevel().nextLevel;
+ if (nextLevel == AuthenticatorAssuranceLevels.aal2) {
+ // The user has already setup MFA, but haven't login via MFA
+ // Redirect them to the verify page
+ return MFAVerifyPage.route;
+ } else {
+ // The user has not yet setup MFA
+ // Redirect them to the enrollment page
+ return MFAEnrollPage.route;
+ }
+ }
+
+ // The user has signed invia MFA, and is allowed to view any page.
+ return null;
+ },
+);
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ // This widget is the root of your application.
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp.router(
+ title: 'MFA App',
+ debugShowCheckedModeBanner: false,
+ theme: ThemeData.light().copyWith(
+ inputDecorationTheme: const InputDecorationTheme(
+ border: OutlineInputBorder(),
+ ),
+ ),
+ routerConfig: _router,
+ );
+ }
+}
diff --git a/examples/auth/flutter-mfa/lib/pages/auth/login_page.dart b/examples/auth/flutter-mfa/lib/pages/auth/login_page.dart
new file mode 100644
index 00000000000..4c3e1b73516
--- /dev/null
+++ b/examples/auth/flutter-mfa/lib/pages/auth/login_page.dart
@@ -0,0 +1,75 @@
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import 'package:mfa_app/main.dart';
+import 'package:mfa_app/pages/home_page.dart';
+import 'package:supabase_flutter/supabase_flutter.dart';
+
+class LoginPage extends StatefulWidget {
+ static const route = '/auth/login';
+
+ const LoginPage({super.key});
+
+ @override
+ State<LoginPage> createState() => _LoginPageState();
+}
+
+class _LoginPageState extends State<LoginPage> {
+ final _emailController = TextEditingController();
+ final _passwordController = TextEditingController();
+
+ @override
+ void dispose() {
+ _emailController.dispose();
+ _passwordController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(title: const Text('Login')),
+ body: ListView(
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 24),
+ children: [
+ TextFormField(
+ controller: _emailController,
+ decoration: const InputDecoration(
+ label: Text('Email'),
+ ),
+ ),
+ const SizedBox(height: 16),
+ TextFormField(
+ controller: _passwordController,
+ decoration: const InputDecoration(
+ label: Text('Password'),
+ ),
+ obscureText: true,
+ ),
+ const SizedBox(height: 16),
+ ElevatedButton(
+ onPressed: () async {
+ try {
+ final email = _emailController.text.trim();
+ final password = _passwordController.text.trim();
+ await supabase.auth.signInWithPassword(
+ email: email,
+ password: password,
+ );
+ if (mounted) {
+ context.go(HomePage.route);
+ }
+ } on AuthException catch (error) {
+ ScaffoldMessenger.of(context)
+ .showSnackBar(SnackBar(content: Text(error.message)));
+ } catch (error) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(content: Text('Unexpected error occured')));
+ }
+ },
+ child: const Text('Login'),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/examples/auth/flutter-mfa/lib/pages/auth/register_page.dart b/examples/auth/flutter-mfa/lib/pages/auth/register_page.dart
new file mode 100644
index 00000000000..a73fb7386b0
--- /dev/null
+++ b/examples/auth/flutter-mfa/lib/pages/auth/register_page.dart
@@ -0,0 +1,101 @@
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import 'package:mfa_app/main.dart';
+import 'package:mfa_app/pages/auth/login_page.dart';
+import 'package:mfa_app/pages/mfa/enroll_page.dart';
+import 'package:supabase_flutter/supabase_flutter.dart';
+
+class RegisterPage extends StatefulWidget {
+ static const route = '/auth/register';
+
+ const RegisterPage({super.key});
+
+ @override
+ State<RegisterPage> createState() => _RegisterPageState();
+}
+
+class _RegisterPageState extends State<RegisterPage> {
+ final _emailController = TextEditingController();
+ final _passwordController = TextEditingController();
+
+ bool _isLoading = false;
+
+ @override
+ void dispose() {
+ _emailController.dispose();
+ _passwordController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(title: const Text('Register')),
+ body: ListView(
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 24),
+ children: [
+ TextFormField(
+ controller: _emailController,
+ decoration: const InputDecoration(
+ label: Text('Email'),
+ ),
+ ),
+ const SizedBox(height: 16),
+ TextFormField(
+ controller: _passwordController,
+ decoration: const InputDecoration(
+ label: Text('Password'),
+ ),
+ obscureText: true,
+ ),
+ const SizedBox(height: 16),
+ ElevatedButton(
+ onPressed: () async {
+ try {
+ setState(() {
+ _isLoading = true;
+ });
+ final email = _emailController.text.trim();
+ final password = _passwordController.text.trim();
+ await supabase.auth.signUp(
+ email: email,
+ password: password,
+ emailRedirectTo:
+ 'mfa-app://callback${MFAEnrollPage.route}', // redirect the user to setup MFA page after email confirmation
+ );
+ if (mounted) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(content: Text('Check your inbox.')));
+ }
+ } on AuthException catch (error) {
+ ScaffoldMessenger.of(context)
+ .showSnackBar(SnackBar(content: Text(error.message)));
+ } catch (error) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(content: Text('Unexpected error occured')));
+ }
+ if (mounted) {
+ setState(() {
+ _isLoading = false;
+ });
+ }
+ },
+ child: _isLoading
+ ? const SizedBox(
+ height: 24,
+ width: 24,
+ child: Center(
+ child: CircularProgressIndicator(color: Colors.white)),
+ )
+ : const Text('Register'),
+ ),
+ const SizedBox(height: 16),
+ TextButton(
+ onPressed: () => context.push(LoginPage.route),
+ child: const Text('I already have an account'),
+ )
+ ],
+ ),
+ );
+ }
+}
diff --git a/examples/auth/flutter-mfa/lib/pages/home_page.dart b/examples/auth/flutter-mfa/lib/pages/home_page.dart
new file mode 100644
index 00000000000..f540edcee92
--- /dev/null
+++ b/examples/auth/flutter-mfa/lib/pages/home_page.dart
@@ -0,0 +1,64 @@
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import 'package:mfa_app/main.dart';
+import 'package:mfa_app/pages/auth/register_page.dart';
+import 'package:mfa_app/pages/list_mfa_page.dart';
+
+class HomePage extends StatelessWidget {
+ static const route = '/';
+
+ const HomePage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ final privatePostsFuture =
+ supabase.from('private_posts').select<List<Map<String, dynamic>>>();
+
+ return Scaffold(
+ appBar: AppBar(
+ title: const Text('Home'),
+ actions: [
+ PopupMenuButton(
+ itemBuilder: (context) {
+ return [
+ PopupMenuItem(
+ child: const Text('Unenroll MFA'),
+ onTap: () {
+ context.push(ListMFAPage.route);
+ },
+ ),
+ PopupMenuItem(
+ child: const Text('Logout'),
+ onTap: () {
+ supabase.auth.signOut();
+ context.go(RegisterPage.route);
+ },
+ ),
+ ];
+ },
+ )
+ ],
+ ),
+ body: FutureBuilder<List<Map<String, dynamic>>>(
+ future: privatePostsFuture,
+ builder: (context, snapshot) {
+ if (snapshot.hasError) {
+ return Center(child: Text(snapshot.error.toString()));
+ }
+ if (!snapshot.hasData) {
+ return const Center(child: CircularProgressIndicator());
+ }
+
+ // Display the secure private content upon retrieval
+ final data = snapshot.data!;
+ return ListView.builder(
+ itemCount: data.length,
+ itemBuilder: (context, index) {
+ return ListTile(title: Text(data[index]['content']));
+ },
+ );
+ },
+ ),
+ );
+ }
+}
diff --git a/examples/auth/flutter-mfa/lib/pages/list_mfa_page.dart b/examples/auth/flutter-mfa/lib/pages/list_mfa_page.dart
new file mode 100644
index 00000000000..c342270c582
--- /dev/null
+++ b/examples/auth/flutter-mfa/lib/pages/list_mfa_page.dart
@@ -0,0 +1,75 @@
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import 'package:mfa_app/main.dart';
+import 'package:mfa_app/pages/auth/register_page.dart';
+
+/// A page that lists the currently signed in user's MFA methods.
+///
+/// The user can unenroll the factors.
+class ListMFAPage extends StatelessWidget {
+ static const route = '/list-mfa';
+ ListMFAPage({super.key});
+
+ final _factorListFuture = supabase.auth.mfa.listFactors();
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(title: const Text('List of MFA Factors')),
+ body: FutureBuilder(
+ future: _factorListFuture,
+ builder: (context, snapshot) {
+ if (snapshot.hasError) {
+ return Center(child: Text(snapshot.error.toString()));
+ }
+ if (!snapshot.hasData) {
+ return const Center(child: CircularProgressIndicator());
+ }
+
+ final response = snapshot.data!;
+ final factors = response.all;
+ return ListView.builder(
+ itemCount: factors.length,
+ itemBuilder: (context, index) {
+ final factor = factors[index];
+ return ListTile(
+ title: Text(factor.friendlyName ?? factor.factorType.name),
+ subtitle: Text(factor.status.name),
+ trailing: IconButton(
+ onPressed: () {
+ showDialog(
+ context: context,
+ builder: (context) {
+ return AlertDialog(
+ title: const Text(
+ 'Are you sure you want to delete this factor? You will be signed out of the app upon removing the factor.',
+ ),
+ actions: [
+ TextButton(
+ onPressed: () {
+ context.pop();
+ },
+ child: const Text('cancel'),
+ ),
+ TextButton(
+ onPressed: () async {
+ await supabase.auth.mfa.unenroll(factor.id);
+ await supabase.auth.signOut();
+ context.go(RegisterPage.route);
+ },
+ child: const Text('delete'),
+ ),
+ ],
+ );
+ });
+ },
+ icon: const Icon(Icons.delete_outline),
+ ),
+ );
+ },
+ );
+ },
+ ),
+ );
+ }
+}
diff --git a/examples/auth/flutter-mfa/lib/pages/mfa/enroll_page.dart b/examples/auth/flutter-mfa/lib/pages/mfa/enroll_page.dart
new file mode 100644
index 00000000000..ddde7714868
--- /dev/null
+++ b/examples/auth/flutter-mfa/lib/pages/mfa/enroll_page.dart
@@ -0,0 +1,135 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:go_router/go_router.dart';
+import 'package:mfa_app/main.dart';
+import 'package:mfa_app/pages/auth/register_page.dart';
+import 'package:mfa_app/pages/home_page.dart';
+import 'package:supabase_flutter/supabase_flutter.dart';
+
+class MFAEnrollPage extends StatefulWidget {
+ static const route = '/mfa/enroll';
+ const MFAEnrollPage({super.key});
+
+ @override
+ State<MFAEnrollPage> createState() => _MFAEnrollPageState();
+}
+
+class _MFAEnrollPageState extends State<MFAEnrollPage> {
+ final _enrollFuture = supabase.auth.mfa.enroll();
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: const Text('Setup MFA'),
+ actions: [
+ TextButton(
+ onPressed: () {
+ supabase.auth.signOut();
+ context.go(RegisterPage.route);
+ },
+ child: Text(
+ 'Logout',
+ style: TextStyle(color: Theme.of(context).colorScheme.onPrimary),
+ ),
+ ),
+ ],
+ ),
+ body: FutureBuilder(
+ future: _enrollFuture,
+ builder: (context, snapshot) {
+ if (snapshot.hasError) {
+ return Center(child: Text(snapshot.error.toString()));
+ }
+ if (!snapshot.hasData) {
+ return const Center(child: CircularProgressIndicator());
+ }
+
+ final response = snapshot.data!;
+ final qrCodeUrl = response.totp.qrCode;
+ final secret = response.totp.secret;
+ final factorId = response.id;
+
+ return ListView(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 20,
+ vertical: 24,
+ ),
+ children: [
+ const Text(
+ 'Open your authentication app and add this app via QR code or by pasting the code below.',
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ ),
+ ),
+ const SizedBox(height: 16),
+ SvgPicture.string(
+ qrCodeUrl,
+ width: 150,
+ height: 150,
+ ),
+ const SizedBox(height: 16),
+ Row(
+ children: [
+ Expanded(
+ child: Text(
+ secret,
+ style: const TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 18,
+ ),
+ ),
+ ),
+ IconButton(
+ onPressed: () {
+ Clipboard.setData(ClipboardData(text: secret));
+ ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
+ content: Text('Copied to your clip board')));
+ },
+ icon: const Icon(Icons.copy),
+ ),
+ ],
+ ),
+ const SizedBox(height: 16),
+ const Text('Enter the code shown in your authentication app.'),
+ const SizedBox(height: 16),
+ TextFormField(
+ decoration: const InputDecoration(
+ hintText: '000000',
+ ),
+ style: const TextStyle(fontSize: 24),
+ textAlign: TextAlign.center,
+ keyboardType: TextInputType.number,
+ onChanged: (value) async {
+ if (value.length != 6) return;
+
+ // kick off the verification process once 6 characters are entered
+ try {
+ final challenge =
+ await supabase.auth.mfa.challenge(factorId: factorId);
+ await supabase.auth.mfa.verify(
+ factorId: factorId,
+ challengeId: challenge.id,
+ code: value,
+ );
+ await supabase.auth.refreshSession();
+ if (mounted) {
+ context.go(HomePage.route);
+ }
+ } on AuthException catch (error) {
+ ScaffoldMessenger.of(context)
+ .showSnackBar(SnackBar(content: Text(error.message)));
+ } catch (error) {
+ ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
+ content: Text('Unexpected error occured')));
+ }
+ },
+ ),
+ ],
+ );
+ },
+ ),
+ );
+ }
+}
diff --git a/examples/auth/flutter-mfa/lib/pages/mfa/verify_page.dart b/examples/auth/flutter-mfa/lib/pages/mfa/verify_page.dart
new file mode 100644
index 00000000000..bb61f3aa74f
--- /dev/null
+++ b/examples/auth/flutter-mfa/lib/pages/mfa/verify_page.dart
@@ -0,0 +1,88 @@
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import 'package:mfa_app/main.dart';
+import 'package:mfa_app/pages/auth/register_page.dart';
+import 'package:mfa_app/pages/home_page.dart';
+import 'package:supabase_flutter/supabase_flutter.dart';
+
+class MFAVerifyPage extends StatefulWidget {
+ static const route = '/mfa/verify';
+ const MFAVerifyPage({super.key});
+
+ @override
+ State<MFAVerifyPage> createState() => _MFAVerifyPageState();
+}
+
+class _MFAVerifyPageState extends State<MFAVerifyPage> {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: const Text('Verify MFA'),
+ actions: [
+ TextButton(
+ onPressed: () {
+ supabase.auth.signOut();
+ context.go(RegisterPage.route);
+ },
+ child: Text(
+ 'Logout',
+ style: TextStyle(color: Theme.of(context).colorScheme.onPrimary),
+ ),
+ ),
+ ],
+ ),
+ body: ListView(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 20,
+ vertical: 24,
+ ),
+ children: [
+ Text(
+ 'Verification Required',
+ style: Theme.of(context).textTheme.titleLarge,
+ ),
+ const SizedBox(height: 16),
+ const Text('Enter the code shown in your authentication app.'),
+ const SizedBox(height: 16),
+ TextFormField(
+ decoration: const InputDecoration(
+ hintText: '000000',
+ ),
+ style: const TextStyle(fontSize: 24),
+ textAlign: TextAlign.center,
+ keyboardType: TextInputType.number,
+ onChanged: (value) async {
+ if (value.length != 6) return;
+
+ // kick off the verification process once 6 characters are entered
+ try {
+ final factorsResponse = await supabase.auth.mfa.listFactors();
+ final factor = factorsResponse.totp.first;
+ final factorId = factor.id;
+
+ final challenge =
+ await supabase.auth.mfa.challenge(factorId: factorId);
+ await supabase.auth.mfa.verify(
+ factorId: factorId,
+ challengeId: challenge.id,
+ code: value,
+ );
+ await supabase.auth.refreshSession();
+ if (mounted) {
+ context.go(HomePage.route);
+ }
+ } on AuthException catch (error) {
+ ScaffoldMessenger.of(context)
+ .showSnackBar(SnackBar(content: Text(error.message)));
+ } catch (error) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(content: Text('Unexpected error occured')));
+ }
+ },
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/examples/auth/flutter-mfa/pubspec.yaml b/examples/auth/flutter-mfa/pubspec.yaml
new file mode 100644
index 00000000000..75031289a62
--- /dev/null
+++ b/examples/auth/flutter-mfa/pubspec.yaml
@@ -0,0 +1,93 @@
+name: mfa_app
+description: A new Flutter project.
+# The following line prevents the package from being accidentally published to
+# pub.dev using `flutter pub publish`. This is preferred for private packages.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+# The following defines the version and build number for your application.
+# A version number is three numbers separated by dots, like 1.2.43
+# followed by an optional build number separated by a +.
+# Both the version and the builder number may be overridden in flutter
+# build by specifying --build-name and --build-number, respectively.
+# In Android, build-name is used as versionName while build-number used as versionCode.
+# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
+# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
+# Read more about iOS versioning at
+# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
+# In Windows, build-name is used as the major, minor, and patch parts
+# of the product and file versions whie build-number is used as the build suffix.
+version: 1.0.0+1
+
+environment:
+ sdk: '>=2.19.6 <3.0.0'
+
+# Dependencies specify other packages that your package needs in order to work.
+# To automatically upgrade your package dependencies to the latest versions
+# consider running `flutter pub upgrade --major-versions`. Alternatively,
+# dependencies can be manually updated by changing the version numbers below to
+# the latest version available on pub.dev. To see which dependencies have newer
+# versions available, run `flutter pub outdated`.
+dependencies:
+ flutter:
+ sdk: flutter
+
+
+ # The following adds the Cupertino Icons font to your application.
+ # Use with the CupertinoIcons class for iOS style icons.
+ cupertino_icons: ^1.0.2
+ supabase_flutter: ^1.8.1
+ go_router: ^7.0.0
+ flutter_svg: ^2.0.5
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+
+ # The "flutter_lints" package below contains a set of recommended lints to
+ # encourage good coding practices. The lint set provided by the package is
+ # activated in the `analysis_options.yaml` file located at the root of your
+ # package. See that file for information about deactivating specific lint
+ # rules and activating additional ones.
+ flutter_lints: ^2.0.0
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter packages.
+flutter:
+
+ # The following line ensures that the Material Icons font is
+ # included with your application, so that you can use the icons in
+ # the material Icons class.
+ uses-material-design: true
+
+ # To add assets to your application, add an assets section, like this:
+ # assets:
+ # - images/a_dot_burr.jpeg
+ # - images/a_dot_ham.jpeg
+
+ # An image asset can refer to one or more resolution-specific "variants", see
+ # https://flutter.dev/assets-and-images/#resolution-aware
+
+ # For details regarding adding assets from package dependencies, see
+ # https://flutter.dev/assets-and-images/#from-packages
+
+ # To add custom fonts to your application, add a fonts section here,
+ # in this "flutter" section. Each entry in this list should have a
+ # "family" key with the font family name, and a "fonts" key with a
+ # list giving the asset and other descriptors for the font. For
+ # example:
+ # fonts:
+ # - family: Schyler
+ # fonts:
+ # - asset: fonts/Schyler-Regular.ttf
+ # - asset: fonts/Schyler-Italic.ttf
+ # style: italic
+ # - family: Trajan Pro
+ # fonts:
+ # - asset: fonts/TrajanPro.ttf
+ # - asset: fonts/TrajanPro_Bold.ttf
+ # weight: 700
+ #
+ # For details regarding fonts from package dependencies,
+ # see https://flutter.dev/custom-fonts/#from-packages
diff --git a/examples/auth/flutter-mfa/web/favicon.png b/examples/auth/flutter-mfa/web/favicon.png
new file mode 100644
index 00000000000..8aaa46ac1ae
Binary files /dev/null and b/examples/auth/flutter-mfa/web/favicon.png differ
diff --git a/examples/auth/flutter-mfa/web/icons/Icon-192.png b/examples/auth/flutter-mfa/web/icons/Icon-192.png
new file mode 100644
index 00000000000..b749bfef074
Binary files /dev/null and b/examples/auth/flutter-mfa/web/icons/Icon-192.png differ
diff --git a/examples/auth/flutter-mfa/web/icons/Icon-512.png b/examples/auth/flutter-mfa/web/icons/Icon-512.png
new file mode 100644
index 00000000000..88cfd48dff1
Binary files /dev/null and b/examples/auth/flutter-mfa/web/icons/Icon-512.png differ
diff --git a/examples/auth/flutter-mfa/web/icons/Icon-maskable-192.png b/examples/auth/flutter-mfa/web/icons/Icon-maskable-192.png
new file mode 100644
index 00000000000..eb9b4d76e52
Binary files /dev/null and b/examples/auth/flutter-mfa/web/icons/Icon-maskable-192.png differ
diff --git a/examples/auth/flutter-mfa/web/icons/Icon-maskable-512.png b/examples/auth/flutter-mfa/web/icons/Icon-maskable-512.png
new file mode 100644
index 00000000000..d69c56691fb
Binary files /dev/null and b/examples/auth/flutter-mfa/web/icons/Icon-maskable-512.png differ
diff --git a/examples/auth/flutter-mfa/web/index.html b/examples/auth/flutter-mfa/web/index.html
new file mode 100644
index 00000000000..68a5ad2b5cb
--- /dev/null
+++ b/examples/auth/flutter-mfa/web/index.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <!--
+ If you are serving your web app in a path other than the root, change the
+ href value below to reflect the base path you are serving from.
+
+ The path provided below has to start and end with a slash "/" in order for
+ it to work correctly.
+
+ For more details:
+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
+
+ This is a placeholder for base href that will be replaced by the value of
+ the `--base-href` argument provided to `flutter build`.
+ -->
+ <base href="$FLUTTER_BASE_HREF">
+
+ <meta charset="UTF-8">
+ <meta content="IE=Edge" http-equiv="X-UA-Compatible">
+ <meta name="description" content="A new Flutter project.">
+
+ <!-- iOS meta tags & icons -->
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
+ <meta name="apple-mobile-web-app-title" content="mfa_app">
+ <link rel="apple-touch-icon" href="icons/Icon-192.png">
+
+ <!-- Favicon -->
+ <link rel="icon" type="image/png" href="favicon.png"/>
+
+ <title>mfa_app</title>
+ <link rel="manifest" href="manifest.json">
+
+ <script>
+ // The value below is injected by flutter build, do not touch.
+ var serviceWorkerVersion = null;
+ </script>
+ <!-- This script adds the flutter initialization JS code -->
+ <script src="flutter.js" defer></script>
+</head>
+<body>
+ <script>
+ window.addEventListener('load', function(ev) {
+ // Download main.dart.js
+ _flutter.loader.loadEntrypoint({
+ serviceWorker: {
+ serviceWorkerVersion: serviceWorkerVersion,
+ },
+ onEntrypointLoaded: function(engineInitializer) {
+ engineInitializer.initializeEngine().then(function(appRunner) {
+ appRunner.runApp();
+ });
+ }
+ });
+ });
+ </script>
+</body>
+</html>
diff --git a/examples/auth/flutter-mfa/web/manifest.json b/examples/auth/flutter-mfa/web/manifest.json
new file mode 100644
index 00000000000..222e13d6e91
--- /dev/null
+++ b/examples/auth/flutter-mfa/web/manifest.json
@@ -0,0 +1,35 @@
+{
+ "name": "mfa_app",
+ "short_name": "mfa_app",
+ "start_url": ".",
+ "display": "standalone",
+ "background_color": "#0175C2",
+ "theme_color": "#0175C2",
+ "description": "A new Flutter project.",
+ "orientation": "portrait-primary",
+ "prefer_related_applications": false,
+ "icons": [
+ {
+ "src": "icons/Icon-192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "icons/Icon-512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ },
+ {
+ "src": "icons/Icon-maskable-192.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "purpose": "maskable"
+ },
+ {
+ "src": "icons/Icon-maskable-512.png",
+ "sizes": "512x512",
+ "type": "image/png",
+ "purpose": "maskable"
+ }
+ ]
+}