Skip to content

Commit ddc718e

Browse files
Googlera-maurice
authored andcommitted
FederatedAuthProvider desktop tests for auth::User::LinkWithProvider and auth::User::ReauthenticateWithProvider.
See also cl/259936033 for the main implementation and Auth tests, as well as go/firebase-idp-cpp-unity for API doc. PiperOrigin-RevId: 260138648
1 parent ef54ed2 commit ddc718e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

auth/src/desktop/auth_providers/federated_auth_provider.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Future<SignInResult> FederatedOAuthProvider::Link(AuthData* auth_data) {
9595
FIREBASE_ASSERT_RETURN(Future<SignInResult>(), handler_);
9696
Future<SignInResult> future =
9797
CreateAuthFuture(auth_data, kAuthFn_LinkWithProvider);
98-
if (future.status() != kFutureStatusPending) {
98+
if (future.status() == kFutureStatusPending) {
9999
AuthCompletionHandle* auth_completion_handle = new AuthCompletionHandle(
100100
SafeFutureHandle<SignInResult>(future.GetHandle()), auth_data);
101101
handler_->OnLink(provider_data_, auth_completion_handle);
@@ -109,7 +109,7 @@ Future<SignInResult> FederatedOAuthProvider::Reauthenticate(
109109
FIREBASE_ASSERT_RETURN(Future<SignInResult>(), handler_);
110110
Future<SignInResult> future =
111111
CreateAuthFuture(auth_data, kAuthFn_ReauthenticateWithProvider);
112-
if (future.status() != kFutureStatusPending) {
112+
if (future.status() == kFutureStatusPending) {
113113
AuthCompletionHandle* auth_completion_handle = new AuthCompletionHandle(
114114
SafeFutureHandle<SignInResult>(future.GetHandle()), auth_data);
115115
handler_->OnReauthenticate(provider_data_, auth_completion_handle);

0 commit comments

Comments
 (0)