FirebaseExtended/flutterfire_desktop

firebase_auth_desktop throws UnimplementedError on tenantId

Kazade opened this issue · 0 comments

Bug report

Describe the bug

Firebase's User.toString() method looks like this:

  @override
  String toString() {
    return '$User('
        'displayName: $displayName, '
        'email: $email, '
        'emailVerified: $emailVerified, '
        'isAnonymous: $isAnonymous, '
        'metadata: $metadata, '
        'phoneNumber: $phoneNumber, '
        'photoURL: $photoURL, '
        'providerData, $providerData, '
        'refreshToken: $refreshToken, '
        'tenantId: $tenantId, '   // <<<<< Note!
        'uid: $uid)';
  }

This calls tenantId from the user in firebase_auth_desktop, which forwards to the user from firebase_auth_dart where tenantId is unimplemented:

  /// The current user's tenant ID.
  ///
  /// This is a read-only property, which indicates the tenant ID used to sign in
  /// the current user.
  /// This is null if the user is signed in from the parent project.
  String? get tenantId => throw UnimplementedError();

Steps to reproduce

Steps to reproduce the behavior:

  1. Call User.toString() on a Firebase User

Expected behavior

The toString() method should work and tenantId should appear.

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.5, on Fedora Linux 37 (Workstation Edition) 6.0.16-300.fc37.x86_64, locale en_GB.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.74.2)
[✓] Connected device (1 available)
[✓] HTTP Host Availability