@@ -1704,11 +1704,6 @@ extension User: NSSecureCoding {}
1704
1704
1705
1705
public required init ? ( coder: NSCoder ) {
1706
1706
guard let userID = coder. decodeObject ( of: NSString . self, forKey: kUserIDCodingKey) as? String ,
1707
- let apiKey = coder. decodeObject ( of: NSString . self, forKey: kAPIKeyCodingKey) as? String ,
1708
- let appID = coder. decodeObject (
1709
- of: NSString . self,
1710
- forKey: kFirebaseAppIDCodingKey
1711
- ) as? String ,
1712
1707
let tokenService = coder. decodeObject ( of: SecureTokenService . self,
1713
1708
forKey: kTokenServiceCodingKey) else {
1714
1709
return nil
@@ -1746,8 +1741,17 @@ extension User: NSSecureCoding {}
1746
1741
self . phoneNumber = phoneNumber
1747
1742
self . metadata = metadata ?? UserMetadata ( withCreationDate: nil , lastSignInDate: nil )
1748
1743
self . tenantID = tenantID
1749
- // The `heartbeatLogger` and `appCheck` will be set later via a property update.
1750
- requestConfiguration = AuthRequestConfiguration ( apiKey: apiKey, appID: appID)
1744
+
1745
+ // Note, in practice, the caller will set the `auth` property of this user
1746
+ // instance which will as a side-effect overwrite the request configuration.
1747
+ // The assignment here is a best-effort placeholder.
1748
+ let apiKey = coder. decodeObject ( of: NSString . self, forKey: kAPIKeyCodingKey) as? String
1749
+ let appID = coder. decodeObject (
1750
+ of: NSString . self,
1751
+ forKey: kFirebaseAppIDCodingKey
1752
+ ) as? String
1753
+ requestConfiguration = AuthRequestConfiguration ( apiKey: apiKey ?? " " , appID: appID ?? " " )
1754
+
1751
1755
userProfileUpdate = UserProfileUpdate ( )
1752
1756
#if os(iOS)
1753
1757
self . multiFactor = multiFactor ?? MultiFactor ( )
0 commit comments