This package is discontinued & deprecated in favor of the changes to com.google.firebase:firebase-auth:20.0.0
,
now supporting devices without Google Play services
Until the Firebase BoM (Bill of Materials) version 26.0.0
is rolled out to flutterfire,
it is possible to force integrate the library via app/build.grade
:
dependencies {
implementation ('com.google.firebase:firebase-auth') {
version {
strictly '20.0.0'
}
}
}
Thank you to all contributors who helped with the project!
Notice: The plugin is currently in development. See Limitations below for supported features.
You are more than welcome to contribute and extend the plugins functionality.
A Flutter plugin to use the Firebase Authentication API via REST.
Non Google Mobile Services (GMS) devices (such as Huawei or Amazon devices) can use the plugin to authenticate with Firebase, and can use plugins requiring user authentication such as
without further modifications.
The plugin supports REST authentication with Android only, but other platforms can be used through the standard firebase_auth implementation (see installation below).
This plugins also implements an InternalAuthProvider
for many other firebase plugins to use.
Firebase Instance Id (FirebaseIid) is not implemented yet by this plugin, therefore some plugins are reduced in functionality or might not work.
Note, you cannot also include the FirebaseAuth client library in your build.
For more information about the implementation read here.
The plugin utilizes the existing implementation and method channels of firebase_auth.
All implemented methods of the standard dart library can be used (see limitations), as this plugin only overrides the Android part of the method channel implementation!
FirebaseAuth.instance.signInWithCustomToken(token);
To use this plugin, see installation below.
To utilize the existing dart implementationa and method channels of firebase_auth
,
the installation comes with some unique requirements:
- Fork
flutterfire
- Edit
packages/firebase_auth/firebase_auth/pubspec.yaml
:- Change the plugins section:
flutter: plugin: platforms: android: default_package: firebase_rest_auth ios: pluginClass: FLTFirebaseAuthPlugin macos: pluginClass: FLTFirebaseAuthPlugin web: default_package: firebase_auth_web
- Add this plugin to your forks
pubspec.yml
dependencies: firebase_rest_auth: git: [email protected]:simpleclub/firebase_rest_auth.git
- Commit the fork to a custom branch e.g.
firebase-rest-auth
- Add your fork to your projects
pubspec.yml
firebase_auth:
git:
url: https://github.com/<your_name_here>/flutterfire
path: packages/firebase_auth/firebase_auth
ref: firebase-rest-auth
A simple, pre-forked implementation is available at simpleclub-extended/flutterfire, branch firebase-auth/firebase-rest-auth
The plugins Android implementation is inspired heavily by FirebaseExtended/auth-without-play-services, therefore it currently shares the same limitations as described in the disclaimer.
Implemented methods of firebase_auth
are:
signInAnonymously()
signInWithCustomToken({@required String token})
signInWithEmailAndPassword({@required String email, @required String password})
get onAuthStateChanged
getIdToken()
signOut()
A lot of methods such as currentUser
are internally implemented by the Flutter instance and need no custom override.
You are more than welcome to contribute and extend the plugins functionality.
If you wish to contribute a change in this repo, please review our contribution guide, and send a pull request.