Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idTokenChanges method is not available #105

Open
bmaronka opened this issue Nov 23, 2023 · 1 comment
Open

idTokenChanges method is not available #105

bmaronka opened this issue Nov 23, 2023 · 1 comment

Comments

@bmaronka
Copy link

I wanted to create some widget and integration tests, which are basing on idTokenChanges method. Could you add it to MockFirebaseAuth?

@PLGuerraDesigns
Copy link

I am also facing this issue while implementing integration tests. Any ideas on how to resolve this?

class Authentication extends ChangeNotifier {
  Authentication({bool? useMockUser}) {
    if (useMockUser != null && useMockUser) {
      _auth = MockFirebaseAuth(
        signedIn: true,
      );
    } else {
      _auth = FirebaseAuth.instance;
    }
  }

  late final FirebaseAuth _auth;

  Stream<dynamic> get user => _auth.authStateChanges();

  ...
}
Running Xcode build...                                          
Xcode build done.                                           48.6s
Failed to build iOS app
Error (Xcode): ../../.pub-cache/hosted/pub.dev/firebase_auth_mocks-0.9.2/lib/src/mock_user.dart:92:23: Error: The argument type 'Map<String, Object>' can't be assigned to the parameter type 'PigeonIdTokenResult'.

Could not build the application for the simulator.
TestDeviceException(Unable to start the app on the device.)
package:flutter_tools/src/test/integration_test_device.dart 63:7  IntegrationTestTestDevice.start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants