@@ -122,19 +122,22 @@ - (void)verifyForceRefresh:(BOOL)forceRefresh
122
122
}
123
123
});
124
124
} else {
125
- NSLog (@" reCAPTCHA verification faled because reCAPTCHA SDK "
126
- @" not linked." );
125
+ FIRLogError (kFIRLoggerAuth , @" I-AUT000026" ,
126
+ @" reCAPTCHA verification failed because "
127
+ @" reCAPTCHA SDK not linked." );
127
128
completion (nil ,
128
129
[FIRAuthErrorUtils recaptchaSDKNotLinkedError ]);
129
130
}
130
131
} else {
131
- NSLog (@" reCAPTCHA verification faled because reCAPTCHA SDK "
132
- @" not linked." );
132
+ FIRLogError (kFIRLoggerAuth , @" I-AUT000026" ,
133
+ @" reCAPTCHA verification failed because reCAPTCHA "
134
+ @" SDK not linked." );
133
135
completion (nil ,
134
136
[FIRAuthErrorUtils recaptchaSDKNotLinkedError ]);
135
137
}
136
138
} else {
137
- NSLog (@" reCAPTCHA verification succeeded." );
139
+ FIRLogInfo (kFIRLoggerAuth , @" I-AUT000027" ,
140
+ @" reCAPTCHA verification succeeded." );
138
141
[self retrieveRecaptchaTokenWithAction: action
139
142
completion: completion];
140
143
}
@@ -160,10 +163,12 @@ - (void)retrieveRecaptchaConfigForceRefresh:(BOOL)forceRefresh
160
163
callback: ^(FIRGetRecaptchaConfigResponse *_Nullable response,
161
164
NSError *_Nullable error) {
162
165
if (error) {
163
- NSLog (@" reCAPTCHA config retrieval failed." );
166
+ FIRLogError (kFIRLoggerAuth , @" I-AUT000028" ,
167
+ @" reCAPTCHA config retrieval failed." );
164
168
completion (error);
165
169
}
166
- NSLog (@" reCAPTCHA config retrieval succeeded." );
170
+ FIRLogInfo (kFIRLoggerAuth , @" I-AUT000029" ,
171
+ @" reCAPTCHA config retrieval succeeded." );
167
172
FIRAuthRecaptchaConfig *config = [[FIRAuthRecaptchaConfig alloc ] init ];
168
173
// Response's site key is of the format projects/<project-id>/keys/<site-key>'
169
174
config.siteKey = [response.recaptchaKey componentsSeparatedByString: @" /" ][3 ];
@@ -218,11 +223,13 @@ - (void)retrieveRecaptchaTokenWithAction:(FIRAuthRecaptchaAction)action
218
223
execute: customAction
219
224
completion: ^(NSString *_Nullable token, NSError *_Nullable error) {
220
225
if (!error) {
221
- NSLog ( @" reCAPTCHA token retrieval succeeded." );
226
+ FIRLogInfo ( kFIRLoggerAuth , @" I-AUT000030 " , @" reCAPTCHA token retrieval succeeded." );
222
227
completion (token, nil );
223
228
return ;
224
229
} else {
225
- NSLog (@" reCAPTCHA token retrieval failed. NO_RECAPTCHA sent as the fake code." );
230
+ FIRLogError (
231
+ kFIRLoggerAuth , @" I-AUT000031" ,
232
+ @" reCAPTCHA token retrieval failed. NO_RECAPTCHA sent as the fake code." );
226
233
completion (kFakeToken , nil );
227
234
}
228
235
}];
0 commit comments