From 426bee7e1c0e7c2e6763038bd59e61c123c25230 Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Sat, 25 Feb 2023 16:02:59 -0500 Subject: [PATCH] Authentication with Firebase v0.1 --- .gitignore | 1 + android/app/build.gradle | 3 + android/app/google-services.json | 46 +++ android/build.gradle | 3 + ios/Runner/GoogleService-Info.plist | 34 ++ ios/firebase_app_id_file.json | 7 + lib/authGate.dart | 63 ++++ lib/firebase_options.dart | 62 +++ lib/home.dart | 63 ++++ lib/main.dart | 129 ++----- linux/flutter/generated_plugin_registrant.cc | 4 + linux/flutter/generated_plugins.cmake | 1 + macos/Flutter/GeneratedPluginRegistrant.swift | 14 + pubspec.lock | 355 ++++++++++++++++++ pubspec.yaml | 10 +- .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 17 files changed, 688 insertions(+), 111 deletions(-) create mode 100644 android/app/google-services.json create mode 100644 ios/Runner/GoogleService-Info.plist create mode 100644 ios/firebase_app_id_file.json create mode 100644 lib/authGate.dart create mode 100644 lib/firebase_options.dart create mode 100644 lib/home.dart diff --git a/.gitignore b/.gitignore index 24476c5..2562d32 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ .atom/ .buildlog/ .history +*.env .svn/ migrate_working_dir/ diff --git a/android/app/build.gradle b/android/app/build.gradle index 382c868..1d9d292 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -22,6 +22,9 @@ if (flutterVersionName == null) { } apply plugin: 'com.android.application' +// START: FlutterFire Configuration +apply plugin: 'com.google.gms.google-services' +// END: FlutterFire Configuration apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..0765abf --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,46 @@ +{ + "project_info": { + "project_number": "291581242565", + "project_id": "swipeshare-4dda3", + "storage_bucket": "swipeshare-4dda3.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:291581242565:android:f58090ab55e23ce4be14ac", + "android_client_info": { + "package_name": "com.example.ruswipeshare" + } + }, + "oauth_client": [ + { + "client_id": "291581242565-e78k51oqmh16gucul3r06du8tenhk7bq.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAMZUITiSkYYFEcaaSnuX70okfS-dpSGzs" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "291581242565-e78k51oqmh16gucul3r06du8tenhk7bq.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "291581242565-5qar1a26ki4jkgvopd14j7dmc6s68rle.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.example.ruswipeshare" + } + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 58a8c74..3b267d3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -7,6 +7,9 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.2.0' + // START: FlutterFire Configuration + classpath 'com.google.gms:google-services:4.3.10' + // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist new file mode 100644 index 0000000..361cc51 --- /dev/null +++ b/ios/Runner/GoogleService-Info.plist @@ -0,0 +1,34 @@ + + + + + CLIENT_ID + 291581242565-5qar1a26ki4jkgvopd14j7dmc6s68rle.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.291581242565-5qar1a26ki4jkgvopd14j7dmc6s68rle + API_KEY + AIzaSyAnFVTAMj4qTOIes3fvbKmmPW60mYb69qs + GCM_SENDER_ID + 291581242565 + PLIST_VERSION + 1 + BUNDLE_ID + com.example.ruswipeshare + PROJECT_ID + swipeshare-4dda3 + STORAGE_BUCKET + swipeshare-4dda3.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:291581242565:ios:0425a676de6454cfbe14ac + + \ No newline at end of file diff --git a/ios/firebase_app_id_file.json b/ios/firebase_app_id_file.json new file mode 100644 index 0000000..906b97f --- /dev/null +++ b/ios/firebase_app_id_file.json @@ -0,0 +1,7 @@ +{ + "file_generated_by": "FlutterFire CLI", + "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", + "GOOGLE_APP_ID": "1:291581242565:ios:0425a676de6454cfbe14ac", + "FIREBASE_PROJECT_ID": "swipeshare-4dda3", + "GCM_SENDER_ID": "291581242565" +} \ No newline at end of file diff --git a/lib/authGate.dart b/lib/authGate.dart new file mode 100644 index 0000000..bedaf60 --- /dev/null +++ b/lib/authGate.dart @@ -0,0 +1,63 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/material.dart'; +import 'package:flutterfire_ui/auth.dart'; + +import 'home.dart'; + +class AuthGate extends StatelessWidget { + const AuthGate({super.key}); + + @override + Widget build(BuildContext context) { + return StreamBuilder( + stream: FirebaseAuth.instance.authStateChanges(), + builder: (context, snapshot) { + if (!snapshot.hasData) { + return SignInScreen( + providerConfigs: const [ + EmailProviderConfiguration(), + GoogleProviderConfiguration(), + ], + headerBuilder: (context, constraints, shrinkOffset) { + return Padding( + padding: const EdgeInsets.all(20), + child: AspectRatio( + aspectRatio: 1, + child: Image.asset('flutterfire_300x.png'), + ), + ); + }, + subtitleBuilder: (context, action) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: action == AuthAction.signIn + ? const Text('Welcome to FlutterFire, please sign in!') + : const Text('Welcome to Flutterfire, please sign up!'), + ); + }, + footerBuilder: (context, action) { + return const Padding( + padding: EdgeInsets.only(top: 16), + child: Text( + 'By signing in, you agree to our terms and conditions.', + style: TextStyle(color: Colors.grey), + ), + ); + }, + sideBuilder: (context, shrinkOffset) { + return Padding( + padding: const EdgeInsets.all(20), + child: AspectRatio( + aspectRatio: 1, + child: Image.asset('flutterfire_300x.png'), + ), + ); + }, + ); + } + + return const HomeScreen(); + }, + ); + } +} \ No newline at end of file diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart new file mode 100644 index 0000000..f63793e --- /dev/null +++ b/lib/firebase_options.dart @@ -0,0 +1,62 @@ +// File generated by FlutterFire CLI. +// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members +import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; +import 'package:flutter/foundation.dart' + show defaultTargetPlatform, kIsWeb, TargetPlatform; + +/// Default [FirebaseOptions] for use with your Firebase apps. +/// +/// Example: +/// ```dart +/// import 'firebase_options.dart'; +/// // ... +/// await Firebase.initializeApp( +/// options: DefaultFirebaseOptions.currentPlatform, +/// ); +/// ``` +class DefaultFirebaseOptions { + static FirebaseOptions get currentPlatform { + if (kIsWeb) { + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for web - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + } + switch (defaultTargetPlatform) { + case TargetPlatform.android: + return android; + case TargetPlatform.iOS: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for ios - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.macOS: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for macos - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.windows: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for windows - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.linux: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for linux - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + default: + throw UnsupportedError( + 'DefaultFirebaseOptions are not supported for this platform.', + ); + } + } + + static const FirebaseOptions android = FirebaseOptions( + apiKey: 'AIzaSyAMZUITiSkYYFEcaaSnuX70okfS-dpSGzs', + appId: '1:291581242565:android:f58090ab55e23ce4be14ac', + messagingSenderId: '291581242565', + projectId: 'swipeshare-4dda3', + storageBucket: 'swipeshare-4dda3.appspot.com', + ); +} diff --git a/lib/home.dart b/lib/home.dart new file mode 100644 index 0000000..bedaf60 --- /dev/null +++ b/lib/home.dart @@ -0,0 +1,63 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/material.dart'; +import 'package:flutterfire_ui/auth.dart'; + +import 'home.dart'; + +class AuthGate extends StatelessWidget { + const AuthGate({super.key}); + + @override + Widget build(BuildContext context) { + return StreamBuilder( + stream: FirebaseAuth.instance.authStateChanges(), + builder: (context, snapshot) { + if (!snapshot.hasData) { + return SignInScreen( + providerConfigs: const [ + EmailProviderConfiguration(), + GoogleProviderConfiguration(), + ], + headerBuilder: (context, constraints, shrinkOffset) { + return Padding( + padding: const EdgeInsets.all(20), + child: AspectRatio( + aspectRatio: 1, + child: Image.asset('flutterfire_300x.png'), + ), + ); + }, + subtitleBuilder: (context, action) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: action == AuthAction.signIn + ? const Text('Welcome to FlutterFire, please sign in!') + : const Text('Welcome to Flutterfire, please sign up!'), + ); + }, + footerBuilder: (context, action) { + return const Padding( + padding: EdgeInsets.only(top: 16), + child: Text( + 'By signing in, you agree to our terms and conditions.', + style: TextStyle(color: Colors.grey), + ), + ); + }, + sideBuilder: (context, shrinkOffset) { + return Padding( + padding: const EdgeInsets.all(20), + child: AspectRatio( + aspectRatio: 1, + child: Image.asset('flutterfire_300x.png'), + ), + ); + }, + ); + } + + return const HomeScreen(); + }, + ); + } +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 008fa38..6895481 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,115 +1,28 @@ +import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; -void main() { +import 'firebase_options.dart'; +import 'authGate.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); + await dotenv.load(fileName: ".env"); runApp(const MyApp()); } class MyApp extends StatelessWidget { - const MyApp({super.key}); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // Try running your application with "flutter run". You'll see the - // application has a blue toolbar. Then, without quitting the app, try - // changing the primarySwatch below to Colors.green and then invoke - // "hot reload" (press "r" in the console where you ran "flutter run", - // or simply save your changes to "hot reload" in a Flutter IDE). - // Notice that the counter didn't reset back to zero; the application - // is not restarted. - primarySwatch: Colors.blue, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Invoke "debug painting" (press "p" in the console, choose the - // "Toggle Debug Paint" action from the Flutter Inspector in Android - // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) - // to see the wireframe for each widget. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. - ); - } + const MyApp({super.key}); + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: const AuthGate(), + ); + } } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..1c65bab 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,10 @@ #include "generated_plugin_registrant.h" +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) desktop_webview_auth_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopWebviewAuthPlugin"); + desktop_webview_auth_plugin_register_with_registrar(desktop_webview_auth_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..e5bf8b2 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + desktop_webview_auth ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..4889eec 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,20 @@ import FlutterMacOS import Foundation +import cloud_firestore +import desktop_webview_auth +import firebase_auth +import firebase_core +import firebase_database +import sign_in_with_apple +import twitter_login func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) + DesktopWebviewAuthPlugin.register(with: registry.registrar(forPlugin: "DesktopWebviewAuthPlugin")) + FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) + FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) + FLTFirebaseDatabasePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseDatabasePlugin")) + SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin")) + TwitterLoginPlugin.register(with: registry.registrar(forPlugin: "TwitterLoginPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 7e7f2ca..8b22a0b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,14 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: "64fcb0dbca4386356386c085142fa6e79c00a3326ceaa778a2d25f5d9ba61441" + url: "https://pub.dev" + source: hosted + version: "1.0.16" async: dependency: transitive description: @@ -33,6 +41,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + cloud_firestore: + dependency: transitive + description: + name: cloud_firestore + sha256: "65f148d9f5b4f389320abb45847120cf5e46094c1a8cbc64934ffc1e29688596" + url: "https://pub.dev" + source: hosted + version: "4.4.3" + cloud_firestore_platform_interface: + dependency: transitive + description: + name: cloud_firestore_platform_interface + sha256: "43ccae09f7e0c82752e69c251c6dc5efcdff4ddcfc09564175a28657bbd74188" + url: "https://pub.dev" + source: hosted + version: "5.11.3" + cloud_firestore_web: + dependency: transitive + description: + name: cloud_firestore_web + sha256: e054c007217e28e07179bbae0564c2a4f6338a60bddb0c139e4834e953f4b95c + url: "https://pub.dev" + source: hosted + version: "3.3.3" collection: dependency: transitive description: @@ -41,6 +73,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" + source: hosted + version: "3.0.2" cupertino_icons: dependency: "direct main" description: @@ -49,6 +89,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + desktop_webview_auth: + dependency: transitive + description: + name: desktop_webview_auth + sha256: "9de17601e1521b7cc2de1c5538e92f64833da668cba101bf11b2f61ce652becc" + url: "https://pub.dev" + source: hosted + version: "0.0.11" + email_validator: + dependency: transitive + description: + name: email_validator + sha256: e9a90f27ab2b915a27d7f9c2a7ddda5dd752d6942616ee83529b686fc086221b + url: "https://pub.dev" + source: hosted + version: "2.1.17" fake_async: dependency: transitive description: @@ -57,11 +113,131 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + firebase_auth: + dependency: "direct main" + description: + name: firebase_auth + sha256: "9907d80446466e638dad31c195150b305dffd145dc57610fcd12c72289432143" + url: "https://pub.dev" + source: hosted + version: "4.2.9" + firebase_auth_platform_interface: + dependency: transitive + description: + name: firebase_auth_platform_interface + sha256: c645fec50b0391aa878288f58fa4fe9762c271380c457aedf5c7c9b718604f68 + url: "https://pub.dev" + source: hosted + version: "6.11.11" + firebase_auth_web: + dependency: transitive + description: + name: firebase_auth_web + sha256: "2dcf2a36852b9091741b4a4047a02e1f2c43a62c6cacec7df573a793a6543e6d" + url: "https://pub.dev" + source: hosted + version: "5.2.8" + firebase_core: + dependency: "direct main" + description: + name: firebase_core + sha256: fe30ac230f12f8836bb97e6e09197340d3c584526825b1746ea362a82e1e43f7 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + sha256: "5615b30c36f55b2777d0533771deda7e5730e769e5d3cb7fda79e9bed86cfa55" + url: "https://pub.dev" + source: hosted + version: "4.5.3" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + sha256: "291fbcace608aca6c860652e1358ef89752be8cc3ef227f8bbcd1e62775b833a" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + firebase_database: + dependency: transitive + description: + name: firebase_database + sha256: fdf4e9cfd22ac5e79ce188ec521d5445b39da036634cba49c7c428e08da328ec + url: "https://pub.dev" + source: hosted + version: "10.0.14" + firebase_database_platform_interface: + dependency: transitive + description: + name: firebase_database_platform_interface + sha256: cee01eb2a850466151cd13f6930eb1da65d67505c4cedc49022200eac38f2a34 + url: "https://pub.dev" + source: hosted + version: "0.2.2+21" + firebase_database_web: + dependency: transitive + description: + name: firebase_database_web + sha256: "865dc4cbb0c3d64dedfbedf425abb065174096b17ad5b7fc287eca20889235ee" + url: "https://pub.dev" + source: hosted + version: "0.2.1+23" + firebase_dynamic_links: + dependency: transitive + description: + name: firebase_dynamic_links + sha256: "053d609129a6a077f784eb921ae666954849b834ba7c8213ba9895005c67149f" + url: "https://pub.dev" + source: hosted + version: "5.0.15" + firebase_dynamic_links_platform_interface: + dependency: transitive + description: + name: firebase_dynamic_links_platform_interface + sha256: "3280394aad7b130aae26bc0d4efbcca5d7075745e9f2ae3c288d13dd04f91394" + url: "https://pub.dev" + source: hosted + version: "0.2.3+30" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_dotenv: + dependency: "direct main" + description: + name: flutter_dotenv + sha256: d9283d92059a22e9834bc0a31336658ffba77089fb6f3cc36751f1fc7c6661a3 + url: "https://pub.dev" + source: hosted + version: "5.0.2" + flutter_facebook_auth: + dependency: transitive + description: + name: flutter_facebook_auth + sha256: "50dc3eef562acbe1e4cfad478053c9c16f9eaac49ad14ec48f00ed9dae1ba0cd" + url: "https://pub.dev" + source: hosted + version: "4.4.1+1" + flutter_facebook_auth_platform_interface: + dependency: transitive + description: + name: flutter_facebook_auth_platform_interface + sha256: "7950f5f8a6f2270c5d29af2a514733987db1191f70838fa777b282e47365f8c8" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + flutter_facebook_auth_web: + dependency: transitive + description: + name: flutter_facebook_auth_web + sha256: "0f732e968c929a3c11a215ded802557576230ff0a0794c88941a8e92ff07b2eb" + url: "https://pub.dev" + source: hosted + version: "3.2.0" flutter_lints: dependency: "direct dev" description: @@ -70,11 +246,101 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2" + url: "https://pub.dev" + source: hosted + version: "1.1.6" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutterfire_ui: + dependency: "direct main" + description: + name: flutterfire_ui + sha256: "631ac0a39b3e24564aba7d2604a756aa884959f47ddf4f952b592f4b1c981c05" + url: "https://pub.dev" + source: hosted + version: "0.4.3+20" + google_sign_in: + dependency: "direct main" + description: + name: google_sign_in + sha256: "821f354c053d51a2d417b02d42532a19a6ea8057d2f9ebb8863c07d81c98aaf9" + url: "https://pub.dev" + source: hosted + version: "5.4.4" + google_sign_in_android: + dependency: transitive + description: + name: google_sign_in_android + sha256: f27bd56527c567594167bd0a46f7ceb93122ed064d2eee612413d6af0bb2e2e5 + url: "https://pub.dev" + source: hosted + version: "6.1.7" + google_sign_in_ios: + dependency: transitive + description: + name: google_sign_in_ios + sha256: eca3433737cfe8b231127d43a3e6527e07d5f8e4a0c00ce593aaaf7bc92bb135 + url: "https://pub.dev" + source: hosted + version: "5.5.2" + google_sign_in_platform_interface: + dependency: transitive + description: + name: google_sign_in_platform_interface + sha256: fece762f0d2dd762ebde43ad70662a209ff6ee034111976549c392f7763d9264 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + google_sign_in_web: + dependency: transitive + description: + name: google_sign_in_web + sha256: "75cc41ebc53b1756320ee14d9c3018ad3e6cea298147dbcd86e9d0c8d6720b40" + url: "https://pub.dev" + source: hosted + version: "0.10.2+1" + http: + dependency: transitive + description: + name: http + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" + source: hosted + version: "0.13.5" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + intl: + dependency: transitive + description: + name: intl + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" + source: hosted + version: "0.17.0" js: dependency: transitive description: @@ -123,6 +389,70 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.2" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + quiver: + dependency: transitive + description: + name: quiver + sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + url: "https://pub.dev" + source: hosted + version: "3.2.1" + sign_in_with_apple: + dependency: transitive + description: + name: sign_in_with_apple + sha256: "54791280a9b4c233c3a85027c936690f77e2406fd0ffd6e1e0ac92338448d6b5" + url: "https://pub.dev" + source: hosted + version: "3.3.0" + sign_in_with_apple_platform_interface: + dependency: transitive + description: + name: sign_in_with_apple_platform_interface + sha256: a5883edee09ed6be19de19e7d9f618a617fe41a6fa03f76d082dfb787e9ea18d + url: "https://pub.dev" + source: hosted + version: "1.0.0" + sign_in_with_apple_web: + dependency: transitive + description: + name: sign_in_with_apple_web + sha256: "44b66528f576e77847c14999d5e881e17e7223b7b0625a185417829e5306f47a" + url: "https://pub.dev" + source: hosted + version: "1.0.1" sky_engine: dependency: transitive description: flutter @@ -176,6 +506,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.16" + twitter_login: + dependency: transitive + description: + name: twitter_login + sha256: e4a2c65e43041fc5e13632f627571e29ed752c0c6ad39b7756302f678cedfa67 + url: "https://pub.dev" + source: hosted + version: "4.3.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" + source: hosted + version: "1.3.1" vector_math: dependency: transitive description: @@ -184,5 +530,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + xml: + dependency: transitive + description: + name: xml + sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + url: "https://pub.dev" + source: hosted + version: "6.2.2" sdks: dart: ">=2.19.2 <3.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index fd1d8a4..ba14691 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -35,6 +35,11 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 + firebase_core: ^2.7.0 + firebase_auth: ^4.2.9 + flutterfire_ui: ^0.4.3+20 + google_sign_in: ^5.4.4 + flutter_dotenv: ^5.0.2 dev_dependencies: flutter_test: @@ -59,9 +64,8 @@ flutter: 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 +assets: + - .env # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..45e2647 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + DesktopWebviewAuthPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("DesktopWebviewAuthPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..6797231 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + desktop_webview_auth ) list(APPEND FLUTTER_FFI_PLUGIN_LIST