firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

Cannot set tenantId back to null after setting it to something else

Open Rexios80 opened this issue 3 years ago • 11 comments
trafficstars

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: VSCode (Flutter development)
  • Firebase Component: Auth
  • Component version: Whatever flutterfire is using

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

Set tenantId to something. Attempt to set it back to null.

Relevant Code:

auth.setTenantId(null);

Details

flutterfire issue: https://github.com/FirebaseExtended/flutterfire/issues/7896#issue-1107115648

Rexios80 avatar Feb 03 '22 18:02 Rexios80

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Feb 03 '22 18:02 google-oss-bot

Hi, thanks for filing this issue! We are unable to promise any timeline for this, but if others also have this issue, adding a +1 on this issue can help us prioritize adding this to the roadmap.

(Googler-only internal tracking bug: b/217762163)

lisajian avatar Feb 03 '22 20:02 lisajian

I am facing this issue as well. Any solutions or workarounds? @Rexios80

stee1ix avatar Mar 20 '24 10:03 stee1ix

We made a public tenant

Rexios80 avatar Mar 20 '24 13:03 Rexios80

@lisajian @Rexios80 Can you explain a bit more please

stee1ix avatar Mar 21 '24 05:03 stee1ix

@Rexios80 Whats a public tenant?

stee1ix avatar Mar 26 '24 05:03 stee1ix

Instead of having users with no tenant id, we just made sure everyone has a tenant

Rexios80 avatar Mar 26 '24 12:03 Rexios80

Hi, thanks for filing this issue! We are unable to promise any timeline for this, but if others also have this issue, adding a +1 on this issue can help us prioritize adding this to the roadmap.

(Googler-only internal tracking bug: b/217762163)

+1 Please make this a feature

stee1ix avatar Jul 04 '24 09:07 stee1ix

@lisajian Any updates on this?

stee1ix avatar Jul 04 '24 10:07 stee1ix

All it would take is modifying this method in the Android SDK:

    public void setTenantId(@NonNull String var1) {
        Preconditions.checkNotEmpty(var1);
        synchronized(this.zzj) {
            this.zzk = var1;
        }
    }

It looks like all that needs done is removing the @NonNull annotation and the Preconditions.checkNotEmpty(var1) check. That checks if the value is null or empty. It should be replaced with just an empty check if the value is not null.

Obviously I can't see the actual Android SDK code so I can't know for sure if it's that easy, but the tenant id starts out null so I see no reason these extraneous null checks aren't the only roadblock to setting it back to null.

I don't see how this could possibly take over 2 years to implement. What is going on over there? The iOS and web SDKs already allow this so it's not a new feature or something.

Rexios80 avatar Jul 04 '24 14:07 Rexios80

Hi, thanks for filing this issue! We are unable to promise any timeline for this, but if others also have this issue, adding a +1 on this issue can help us prioritize adding this to the roadmap.

(Googler-only internal tracking bug: b/217762163)

+1

ArunGovil avatar Jul 05 '24 05:07 ArunGovil