4

I'm trying to integrate Firebase Authentication for Flutter Desktop Embedding. Is there any Flutter plugin for Firebase Authentication for development in case Desktop Embedding.

I have tried using the Flutter plugin, firebase_auth plugin. But this works only in case of Android and iOS Platforms, getting missing implementation error while running on Desktop Embedding, in my case Windows, as the plugin doesn't have the implementation for Desktop Embedding.

info flutter.tools [ERROR:c:\b\s\w\ir\k\src\flutter\lib\ui\ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method currentUser on channel plugins.flutter.io/firebase_auth)
info flutter.tools #0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)
info flutter.tools <asynchronous suspension>
info flutter.tools #1      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:344:48)
info flutter.tools <asynchronous suspension>
info flutter.tools #2      FirebaseAuth.currentUser (package:firebase_auth/src/firebase_auth.dart:382:10)
info flutter.tools <asynchronous suspension>

I was hoping to get any relevant article or material that will lead me to integrate the firebase authentication in the Flutter app that i'm developing for the Desktop. Is there any libraries other than firebase-auth.

Mazin Ibrahim
  • 7,433
  • 2
  • 33
  • 40
Jemsheer K D
  • 333
  • 3
  • 11
  • 1
    flutter for web hasn't (yet) a plugin system – Rubens Melo Jun 11 '19 at 10:07
  • I was asking for Flutter for Desktop Embedding, i.e for Windows, Linux and Mac. – Jemsheer K D Jun 12 '19 at 14:25
  • Flutter for Desktop Embedding hasn't (yet) a plugin system. Flutter for desktop is still under development. You can find more info here: https://stackoverflow.com/a/56552342/6914403 – Jithin Jude Jun 22 '19 at 05:10
  • @JithinJude the question and answer you mentioned does say that a plugin system is infact available but plugins specifically targeting Firebase does not exist at the moment. I do use chopper plugin in my flutter app for desktop as well as web for network calls. – Jemsheer K D Jun 26 '19 at 10:27
  • in case of chopper for web, i do had to tweak some codes to make it work as normal plugin system is not yet implemented for **Flutter Web** – Jemsheer K D Jun 26 '19 at 10:30
  • In Flutter web, we use this: https://pub.dev/packages/firebase which also seems to have support for command line Dart apps. Did you try that? – Gazihan Alankus Jul 12 '19 at 05:45
  • 1
    Firebase Auth is already web and desktop compatible, i just posted one of the bugs i am facing on desktop. https://stackoverflow.com/questions/60743705/flutter-desktop-firebase-auth-could-not-find-a-valid-googleservice-info-plist – DomingoMG Mar 18 '20 at 16:56
  • That is good to know. I have't developed for the desktop for some time now. Will need to look into those again. Thanks again. @DomingoMG – Jemsheer K D May 06 '20 at 08:43
  • Maybe using OAuth2 is a solution, for now, there is a Flutter package for it. – AVEbrahimi Jan 05 '21 at 06:47
  • Hi, for anyone who is interested in the official flutterfire desktop. please upvote for the feature request in the link below. thanx! https://firebase.uservoice.com/forums/948424-general/suggestions/46591750-desktop-windows-linux-macos-support-for-flutte – HW Kim Jun 02 '23 at 07:02

1 Answers1

1

I am afraid flutter desktop is not yet ready for production use . So is incomplete. You can use firebase products via rest API but not via firebase official plugins.

Adi
  • 876
  • 2
  • 8
  • 17
  • Yes, we all know that flutter desktop is not production ready yet, even Flutter Web is not production ready, even though its in Beta. Using Rest API is also a viable solution at the moment. If anyone can make a Plugin/Package using the same, then that would be a good solution for now. – Jemsheer K D May 03 '20 at 08:21
  • Hi, for anyone who is interested in the official flutterfire desktop. please upvote for the feature request in the link below. thanx! https://firebase.uservoice.com/forums/948424-general/suggestions/46591750-desktop-windows-linux-macos-support-for-flutte – HW Kim Jun 02 '23 at 07:02