Description
To Reproduce
Steps to reproduce the behavior:
- Go to https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth/firebase_auth_web and there you will see confusing instructions. Why should I put that into the official Auth Web example when it should have that there when I download it, although IT DOESN'T!!!!! and the pubspec if quite different from that advice, namely it's this
firebase: ^7.0.0
http_parser: ^3.1.3
meta: ^1.1.7
js: ^0.6.1
firebase_auth_platform_interface: ^1.0.0
firebase_core_platform_interface: ^1.0.0
firebase_core_web:
So this is inside the pubspec.yaml of the official flutter auth web example and then on the official github page you say to just put in THIS
firebase_auth: ^0.15.1
firebase_auth_web: ^0.1.0
What? What about everything else? Why would you have that in the official pubspec and then advise this? Never mind I said, I'll just try adding it. So I did, I even copied the other thing
<html>
...
<body>
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-auth.js"></script>
<script src="main.dart.js"></script>
</body>
</html>
Still it doesn't work.
So basically, the official example doesn't even have the libraries advised on that page. This is really confusing. Also, the official example has a class with methods for signin, you can't start that example because it doesn't have a main, so you have to make a new flutter project and then import that firebase auth web class. Now I want to call those methods, well NO you can't because the class isn't set up that way so that you can just call methods inside it, it's not a helper class, well then what do I call and how? Why isn't this a complete example like the flutter auth for android/ios that I got to work a couple of days ago?
So I tried making a main class that I get with a new flutter project and then in the under floatingActionButton I tried calling this class you provided with signin methods and I did this not
knowing what credential is and how I should provide it.
onPressed: FirebaseAuthWeb.signInWithCredential(context, credential),
What is credential and how do I provide it ?
This is the method in the class you provide for Flutter Auth Web, and inside it has this, meaning I can't really call any of the methods inside because first it will call this:
class FirebaseAuthWeb extends FirebaseAuthPlatform {
static void registerWith(Registrar registrar) {
FirebaseAuthPlatform.instance = FirebaseAuthWeb();
}