@@ -42,37 +42,13 @@ private FirebaseUserInternal GetValidFirebaseUserInternal() {
4242 }
4343 }
4444
45- private void CompleteSignInResult ( SignInResult signInResult ) {
46- if ( signInResult != null ) {
47- // Cache the authProxy in the SignInResult
48- signInResult . authProxy = authProxy ;
49- }
50- }
51-
5245 private void CompleteAuthResult ( AuthResult authResult ) {
5346 if ( authResult != null ) {
5447 // Cache the authProxy in the AuthResult
5548 authResult . authProxy = authProxy ;
5649 }
5750 }
5851
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-
7652 /// Reauthenticate a user via a federated auth provider.
7753 ///
7854 /// @note: This operation is supported only on iOS, tvOS and Android
@@ -85,23 +61,6 @@ public async Task<AuthResult> ReauthenticateWithProviderAsync(FederatedAuthProvi
8561 return result ;
8662 }
8763
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-
10564 /// Link a user via a federated auth provider.
10665 ///
10766 /// @note: This operation is supported only on iOS, tvOS and Android
@@ -114,43 +73,6 @@ public async Task<AuthResult> LinkWithProviderAsync(FederatedAuthProvider provid
11473 return result ;
11574 }
11675
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-
15476 /// Associates a user account from a third-party identity provider.
15577 public async Task < AuthResult > LinkWithCredentialAsync ( Credential credential ) {
15678 FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
@@ -159,28 +81,6 @@ public async Task<AuthResult> LinkWithCredentialAsync(Credential credential) {
15981 return result ;
16082 }
16183
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-
18484 /// Reauthenticate using a credential.
18585 ///
18686 /// Data from the Identity Provider used to sign-in is returned in the
@@ -198,20 +98,6 @@ public async Task<AuthResult> ReauthenticateAndRetrieveDataAsync(Credential cred
19898 return result ;
19999 }
200100
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-
215101 /// Unlinks the current user from the provider specified.
216102 /// Status will be an error if the user is not linked to the given provider.
217103 public async Task < AuthResult > UnlinkAsync ( string provider ) {
@@ -221,24 +107,6 @@ public async Task<AuthResult> UnlinkAsync(string provider) {
221107 return result ;
222108 }
223109
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-
242110 /// Updates the currently linked phone number on the user.
243111 /// This is useful when a user wants to change their phone number. It is a
244112 /// shortcut to calling `UnlinkAsync(phoneCredential.Provider)`
@@ -248,7 +116,7 @@ public async Task<FirebaseUser> UpdatePhoneNumberCredentialAsync(PhoneAuthCreden
248116 FirebaseUserInternal userInternal = GetValidFirebaseUserInternal ( ) ;
249117 // We don't care about the returned user, since there is currently only meant to
250118 // be a single FirebaseUser under the hood.
251- await userInternal . UpdatePhoneNumberCredentialInternalAsync_DEPRECATED ( credential ) ;
119+ await userInternal . UpdatePhoneNumberCredentialInternalAsync ( credential ) ;
252120 return this ;
253121 }
254122
0 commit comments