@@ -42,37 +42,13 @@ private FirebaseUserInternal GetValidFirebaseUserInternal() {
42
42
}
43
43
}
44
44
45
- private void CompleteSignInResult ( SignInResult signInResult ) {
46
- if ( signInResult != null ) {
47
- // Cache the authProxy in the SignInResult
48
- signInResult . authProxy = authProxy ;
49
- }
50
- }
51
-
52
45
private void CompleteAuthResult ( AuthResult authResult ) {
53
46
if ( authResult != null ) {
54
47
// Cache the authProxy in the AuthResult
55
48
authResult . authProxy = authProxy ;
56
49
}
57
50
}
58
51
59
- /// @deprecated This method is deprecated in favor of methods that return
60
- /// `Task<AuthResult>`. Please use
61
- /// @ref ReauthenticateWithProviderAsync(FederatedAuthProvider) instead.
62
- ///
63
- /// Reauthenticate a user via a federated auth provider.
64
- ///
65
- /// @note: This operation is supported only on iOS, tvOS and Android
66
- /// platforms. On other platforms this method will return a Future with a
67
- /// preset error code: kAuthErrorUnimplemented.
68
- [ System . Obsolete ( "Please use `Task<AuthResult> ReauthenticateWithProviderAsync(FederatedAuthProvider)` instead" , false ) ]
69
- public async Task < SignInResult > ReauthenticateWithProviderAsync_DEPRECATED ( FederatedAuthProvider provider ) {
70
- FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
71
- SignInResult result = await userInternal . ReauthenticateWithProviderInternalAsync_DEPRECATED ( provider ) ;
72
- CompleteSignInResult ( result ) ;
73
- return result ;
74
- }
75
-
76
52
/// Reauthenticate a user via a federated auth provider.
77
53
///
78
54
/// @note: This operation is supported only on iOS, tvOS and Android
@@ -85,23 +61,6 @@ public async Task<AuthResult> ReauthenticateWithProviderAsync(FederatedAuthProvi
85
61
return result ;
86
62
}
87
63
88
- /// @deprecated This method is deprecated in favor of methods that return
89
- /// `Task<AuthResult>`. Please use
90
- /// @ref LinkWithProviderAsync(FederatedAuthProvider) instead.
91
- ///
92
- /// Link a user via a federated auth provider.
93
- ///
94
- /// @note: This operation is supported only on iOS, tvOS and Android
95
- /// platforms. On other platforms this method will return a Future with a
96
- /// preset error code: kAuthErrorUnimplemented.
97
- [ System . Obsolete ( "Please use `Task<AuthResult> LinkWithProviderAsync(FederatedAuthProvider)` instead" , false ) ]
98
- public async Task < SignInResult > LinkWithProviderAsync_DEPRECATED ( FederatedAuthProvider provider ) {
99
- FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
100
- SignInResult result = await userInternal . LinkWithProviderInternalAsync_DEPRECATED ( provider ) ;
101
- CompleteSignInResult ( result ) ;
102
- return result ;
103
- }
104
-
105
64
/// Link a user via a federated auth provider.
106
65
///
107
66
/// @note: This operation is supported only on iOS, tvOS and Android
@@ -114,43 +73,6 @@ public async Task<AuthResult> LinkWithProviderAsync(FederatedAuthProvider provid
114
73
return result ;
115
74
}
116
75
117
- /// @deprecated This method is deprecated in favor of methods that return
118
- /// `Task<AuthResult>`. Please use
119
- /// @ref LinkWithCredentialAsync(Credential) instead.
120
- ///
121
- /// Links the user with the given 3rd party credentials.
122
- ///
123
- /// For example, a Facebook login access token, a Twitter token/token-secret
124
- /// pair.
125
- /// Status will be an error if the token is invalid, expired, or otherwise
126
- /// not accepted by the server as well as if the given 3rd party
127
- /// user id is already linked with another user account or if the current user
128
- /// is already linked with another id from the same provider.
129
- ///
130
- /// Data from the Identity Provider used to sign-in is returned in the
131
- /// @ref AdditionalUserInfo inside @ref SignInResult.
132
- [ System . Obsolete ( "Please use `Task<AuthResult> LinkWithCredentialAsync(Credential)` instead" , false ) ]
133
- public async Task < SignInResult > LinkAndRetrieveDataWithCredentialAsync ( Credential credential ) {
134
- FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
135
- SignInResult result = await userInternal . LinkAndRetrieveDataWithCredentialInternalAsync ( credential ) ;
136
- CompleteSignInResult ( result ) ;
137
- return result ;
138
- }
139
-
140
- /// @deprecated This method is deprecated in favor of methods that return
141
- /// `Task<AuthResult>`. Please use
142
- /// @ref LinkWithCredentialAsync(Credential) instead.
143
- ///
144
- /// Associates a user account from a third-party identity provider.
145
- [ System . Obsolete ( "Please use `Task<AuthResult> LinkWithCredentialAsync(Credential)` instead" , false ) ]
146
- public async Task < FirebaseUser > LinkWithCredentialAsync_DEPRECATED ( Credential credential ) {
147
- FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
148
- // We don't care about the returned user, since there is currently only meant to
149
- // be a single FirebaseUser under the hood.
150
- await userInternal . LinkWithCredentialInternalAsync_DEPRECATED ( credential ) ;
151
- return this ;
152
- }
153
-
154
76
/// Associates a user account from a third-party identity provider.
155
77
public async Task < AuthResult > LinkWithCredentialAsync ( Credential credential ) {
156
78
FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
@@ -159,28 +81,6 @@ public async Task<AuthResult> LinkWithCredentialAsync(Credential credential) {
159
81
return result ;
160
82
}
161
83
162
- /// @deprecated This method is deprecated in favor of methods that return
163
- /// `Task<AuthResult>`. Please use
164
- /// @ref ReauthenticateAndRetrieveDataAsync(Credential) instead.
165
- ///
166
- /// Reauthenticate using a credential.
167
- ///
168
- /// Data from the Identity Provider used to sign-in is returned in the
169
- /// AdditionalUserInfo inside the returned SignInResult.
170
- ///
171
- /// Returns an error if the existing credential is not for this user
172
- /// or if sign-in with that credential failed.
173
- ///
174
- /// @note: The current user may be signed out if this operation fails on
175
- /// Android and desktop platforms.
176
- [ System . Obsolete ( "Please use `Task<AuthResult> ReauthenticateAndRetrieveDataAsync(Credential)` instead" , false ) ]
177
- public async Task < SignInResult > ReauthenticateAndRetrieveDataAsync_DEPRECATED ( Credential credential ) {
178
- FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
179
- SignInResult result = await userInternal . ReauthenticateAndRetrieveDataInternalAsync_DEPRECATED ( credential ) ;
180
- CompleteSignInResult ( result ) ;
181
- return result ;
182
- }
183
-
184
84
/// Reauthenticate using a credential.
185
85
///
186
86
/// Data from the Identity Provider used to sign-in is returned in the
@@ -198,20 +98,6 @@ public async Task<AuthResult> ReauthenticateAndRetrieveDataAsync(Credential cred
198
98
return result ;
199
99
}
200
100
201
- /// @deprecated This method is deprecated in favor of methods that return
202
- /// `Task<AuthResult>`. Please use @ref UnlinkAsync(string) instead.
203
- ///
204
- /// Unlinks the current user from the provider specified.
205
- /// Status will be an error if the user is not linked to the given provider.
206
- [ System . Obsolete ( "Please use `Task<AuthResult> UnlinkAsync(string)` instead" , false ) ]
207
- public async Task < FirebaseUser > UnlinkAsync_DEPRECATED ( string provider ) {
208
- FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
209
- // We don't care about the returned user, since there is currently only meant to
210
- // be a single FirebaseUser under the hood.
211
- await userInternal . UnlinkInternalAsync_DEPRECATED ( provider ) ;
212
- return this ;
213
- }
214
-
215
101
/// Unlinks the current user from the provider specified.
216
102
/// Status will be an error if the user is not linked to the given provider.
217
103
public async Task < AuthResult > UnlinkAsync ( string provider ) {
@@ -221,24 +107,6 @@ public async Task<AuthResult> UnlinkAsync(string provider) {
221
107
return result ;
222
108
}
223
109
224
- /// @deprecated This method is deprecated in favor of methods that return
225
- /// `Task<AuthResult>`. Please use
226
- /// @ref UpdatePhoneNumberCredentialAsync(PhoneAuthCredential) instead.
227
- ///
228
- /// Updates the currently linked phone number on the user.
229
- /// This is useful when a user wants to change their phone number. It is a
230
- /// shortcut to calling `UnlinkAsync_DEPRECATED(phoneCredential.Provider)`
231
- /// and then `LinkWithCredentialAsync_DEPRECATED(phoneCredential)`.
232
- /// `phoneCredential` must have been created with @ref PhoneAuthProvider.
233
- [ System . Obsolete ( "Please use `Task<AuthResult> UpdatePhoneNumberCredentialAsync(PhoneAuthCredential)` instead" , false ) ]
234
- public async Task < FirebaseUser > UpdatePhoneNumberCredentialAsync_DEPRECATED ( Credential credential ) {
235
- FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
236
- // We don't care about the returned user, since there is currently only meant to
237
- // be a single FirebaseUser under the hood.
238
- await userInternal . UpdatePhoneNumberCredentialInternalAsync_DEPRECATED ( credential ) ;
239
- return this ;
240
- }
241
-
242
110
/// Updates the currently linked phone number on the user.
243
111
/// This is useful when a user wants to change their phone number. It is a
244
112
/// shortcut to calling `UnlinkAsync(phoneCredential.Provider)`
@@ -248,7 +116,7 @@ public async Task<FirebaseUser> UpdatePhoneNumberCredentialAsync(PhoneAuthCreden
248
116
FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
249
117
// We don't care about the returned user, since there is currently only meant to
250
118
// be a single FirebaseUser under the hood.
251
- await userInternal . UpdatePhoneNumberCredentialInternalAsync_DEPRECATED ( credential ) ;
119
+ await userInternal . UpdatePhoneNumberCredentialInternalAsync ( credential ) ;
252
120
return this ;
253
121
}
254
122
0 commit comments