Skip to content

Commit

Permalink
Merge branch 'master' into je-string-comp
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanedey authored Jan 28, 2025
2 parents 455c241 + dcd8b9e commit 4f3c56d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,10 @@ private CallableOperation<UserRecord, FirebaseAuthException> getUserByProviderUi
// Although we don't really advertise it, we want to also handle
// non-federated idps with this call. So if we detect one of them, we'll
// reroute this request appropriately.
if (providerId == "phone") {
if ("phone".equals(providerId)) {
return this.getUserByPhoneNumberOp(uid);
} else if (providerId == "email") {
}
if ("email".equals(providerId)) {
return this.getUserByEmailOp(uid);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/google/firebase/auth/UserRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public UpdateRequest setPhoneNumber(@Nullable String phone) {
// *and* by setting providersToUnlink to include 'phone', then we'll reject that. Though
// it might also be reasonable to relax this restriction and just unlink it.
for (String dp : deleteProviderIterable) {
if (dp == "phone") {
if ("phone".equals(dp)) {
throw new IllegalArgumentException(
"Both UpdateRequest.setPhoneNumber(null) and "
+ "UpdateRequest.setProvidersToUnlink(['phone']) were set. To unlink from a "
Expand Down Expand Up @@ -601,7 +601,7 @@ public UpdateRequest setProvidersToUnlink(Iterable<String> providerIds) {
for (String id : providerIds) {
checkArgument(!Strings.isNullOrEmpty(id), "providerIds must not be null or empty");

if (id == "phone" && properties.containsKey("phoneNumber")
if ("phone".equals(id) && properties.containsKey("phoneNumber")
&& properties.get("phoneNumber") == null) {
// If we've been told to unlink the phone provider both via setting phoneNumber to null
// *and* by setting providersToUnlink to include 'phone', then we'll reject that. Though
Expand Down

0 comments on commit 4f3c56d

Please sign in to comment.