Skip to content

Commit

Permalink
fix auth flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Jul 31, 2024
1 parent 4302124 commit 68ca23e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
13 changes: 8 additions & 5 deletions auth_flutter/lib/src/auth_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import 'package:firebase_auth/firebase_auth.dart' as native;
import 'package:flutter/foundation.dart';
import 'package:google_sign_in/google_sign_in.dart' as google_sign_in;
import 'package:tekartik_firebase/firebase_mixin.dart';
import 'package:tekartik_firebase_auth/auth.dart';
import 'package:tekartik_firebase_auth/src/auth_mixin.dart';
import 'package:tekartik_firebase_auth_flutter/auth_flutter.dart';
Expand All @@ -14,7 +15,7 @@ import 'import.dart';

/// Flutter impl
class AuthServiceFlutterImpl
with AuthServiceMixin
with common.FirebaseProductServiceMixin<FirebaseAuth>, AuthServiceMixin
implements AuthServiceFlutter {
@override
Auth auth(common.App app) {
Expand Down Expand Up @@ -114,7 +115,9 @@ class _UserFlutterImpl implements User, UserInfoWithIdToken {
}

/// Flutter impl
class AuthFlutterImpl with AuthMixin implements AuthFlutter {
class AuthFlutterImpl
with FirebaseAppProductMixin, FirebaseAuthMixin
implements AuthFlutter {
/// The native instance
final native.FirebaseAuth nativeAuth;

Expand Down Expand Up @@ -151,9 +154,9 @@ class AuthFlutterImpl with AuthMixin implements AuthFlutter {
}

@override
Future close(common.App? app) async {
await super.close(app);
await _onAuthStateChangedSubscription?.cancel();
void dispose() {
_onAuthStateChangedSubscription?.cancel();
super.dispose();
}

google_sign_in.GoogleSignIn? _googleSignIn;
Expand Down
5 changes: 5 additions & 0 deletions auth_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ dependencies:
version: '>=0.4.0+0'
firebase_auth: '>=4.17.6'
google_sign_in: '>=5.4.2'
tekartik_firebase:
git:
url: https://github.com/tekartik/firebase.dart
ref: dart3a
path: firebase
dev_dependencies:
flutter_test:
sdk: flutter
Expand Down

0 comments on commit 68ca23e

Please sign in to comment.