Skip to content

Commit 02dff15

Browse files
committed
Avoid using $ to fix the CI
1 parent 5708c72 commit 02dff15

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/auth/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,10 @@ export async function handleRecaptchaFlow<TRequest, TResponse>(
260260
return actionMethod(authInstance, requestWithRecaptcha);
261261
} else {
262262
return actionMethod(authInstance, request).catch(async error => {
263-
if (error.code === `auth/${AuthErrorCode.MISSING_RECAPTCHA_TOKEN}`) {
263+
if (error.code === 'auth/missing-recaptcha-token') {
264264
console.log(
265-
`${actionName} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`
265+
actionName +
266+
' is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.'
266267
);
267268
const requestWithRecaptcha = await injectRecaptchaFields(
268269
authInstance,
@@ -299,11 +300,13 @@ export async function handleRecaptchaFlow<TRequest, TResponse>(
299300
) {
300301
// AUDIT mode
301302
if (
302-
error.code === `auth/${AuthErrorCode.MISSING_RECAPTCHA_TOKEN}` ||
303-
error.code === `auth/${AuthErrorCode.INVALID_APP_CREDENTIAL}`
303+
error.code === 'auth/missing-recaptcha-token' ||
304+
error.code === 'auth/invalid-app-credential'
304305
) {
305306
console.log(
306-
`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${actionName} flow.`
307+
'Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ' +
308+
actionName +
309+
' flow.'
307310
);
308311
// reCAPTCHA Enterprise token is missing or reCAPTCHA Enterprise token
309312
// check fails.

0 commit comments

Comments
 (0)