[Auth] Restore User decoding to pre-11 behavior #14069
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The logging out was happening because the
User.init(coder:)
implementation in Firebase 11 was returning nil for cases where it previously hadn't in previous major versions.Firebase 11 returned nil when any of the following was nil:
firebase-ios-sdk/FirebaseAuth/Sources/Swift/User/User.swift
Lines 1706 to 1715 in 4e5fbe8
But Firebase 10.29.0 returned nil in only 2 cases:
firebase-ios-sdk/FirebaseAuth/Sources/User/FIRUser.m
Lines 360 to 362 in eca84fd
PR #9046 started encoding an app ID key to the user's archived format and that was first released in 8.11.0, so when updating from < 8.11 to 11+, the user instance would fail decoding with the early exit since the app ID couldn't be unarchived.
This failed silently through Firebase 10 because the Objective-C impl. didn't early exit and a
nil
decoding was silently allowed.Testing:
Fixes #14011
#no-changelog