From a1701c77381ad92123c9c13f7d799a308a0c0d9d Mon Sep 17 00:00:00 2001 From: Sam Olsen Date: Tue, 1 Jun 2021 11:51:00 -0700 Subject: [PATCH 1/2] Fix typo in invalid SMS code error message --- packages-exp/auth-exp/src/api/authentication/mfa.test.ts | 2 +- packages-exp/auth-exp/src/api/authentication/sms.test.ts | 4 ++-- packages-exp/auth-exp/src/core/errors.ts | 2 +- packages/auth/src/error_auth.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages-exp/auth-exp/src/api/authentication/mfa.test.ts b/packages-exp/auth-exp/src/api/authentication/mfa.test.ts index 767edd22943..ebb4b8f6045 100644 --- a/packages-exp/auth-exp/src/api/authentication/mfa.test.ts +++ b/packages-exp/auth-exp/src/api/authentication/mfa.test.ts @@ -158,7 +158,7 @@ describe('api/authentication/finalizeSignInPhoneMfa', () => { await expect(finalizeSignInPhoneMfa(auth, request)).to.be.rejectedWith( FirebaseError, - 'Firebase: The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user. (auth/invalid-verification-code).' + 'Firebase: The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user. (auth/invalid-verification-code).' ); expect(mock.calls[0].request).to.eql({ tenantId: null, diff --git a/packages-exp/auth-exp/src/api/authentication/sms.test.ts b/packages-exp/auth-exp/src/api/authentication/sms.test.ts index 66d1a33e992..b27db5d9475 100644 --- a/packages-exp/auth-exp/src/api/authentication/sms.test.ts +++ b/packages-exp/auth-exp/src/api/authentication/sms.test.ts @@ -154,7 +154,7 @@ describe('api/authentication/signInWithPhoneNumber', () => { await expect(signInWithPhoneNumber(auth, request)).to.be.rejectedWith( FirebaseError, - 'Firebase: The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user. (auth/invalid-verification-code).' + 'Firebase: The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user. (auth/invalid-verification-code).' ); expect(mock.calls[0].request).to.eql(request); }); @@ -222,7 +222,7 @@ describe('api/authentication/linkWithPhoneNumber', () => { await expect(linkWithPhoneNumber(auth, request)).to.be.rejectedWith( FirebaseError, - 'Firebase: The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user. (auth/invalid-verification-code).' + 'Firebase: The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user. (auth/invalid-verification-code).' ); expect(mock.calls[0].request).to.eql(request); }); diff --git a/packages-exp/auth-exp/src/core/errors.ts b/packages-exp/auth-exp/src/core/errors.ts index e80178fa630..651e6b08a78 100644 --- a/packages-exp/auth-exp/src/core/errors.ts +++ b/packages-exp/auth-exp/src/core/errors.ts @@ -186,7 +186,7 @@ function _debugErrorMap(): ErrorMap { [AuthErrorCode.INVALID_AUTH_EVENT]: 'An internal AuthError has occurred.', [AuthErrorCode.INVALID_CODE]: 'The SMS verification code used to create the phone auth credential is ' + - 'invalid. Please resend the verification code sms and be sure use the ' + + 'invalid. Please resend the verification code sms and be sure to use the ' + 'verification code provided by the user.', [AuthErrorCode.INVALID_CONTINUE_URI]: 'The continue URL provided in the request is invalid.', diff --git a/packages/auth/src/error_auth.js b/packages/auth/src/error_auth.js index 236a4dd6f25..351d01e0301 100644 --- a/packages/auth/src/error_auth.js +++ b/packages/auth/src/error_auth.js @@ -280,7 +280,7 @@ fireauth.AuthError.MESSAGES_[fireauth.authenum.Error.INVALID_AUTH_EVENT] = 'An internal error has occurred.'; fireauth.AuthError.MESSAGES_[fireauth.authenum.Error.INVALID_CODE] = 'The SMS verification code used to create the phone auth credential is ' + - 'invalid. Please resend the verification code sms and be sure use the ' + + 'invalid. Please resend the verification code sms and be sure to use the ' + 'verification code provided by the user.'; fireauth.AuthError.MESSAGES_[fireauth.authenum.Error.INVALID_CONTINUE_URI] = 'The continue URL provided in the request is invalid.'; From 575d01df160fbfe916d2353023b03b69b0b51a01 Mon Sep 17 00:00:00 2001 From: Sam Olsen Date: Tue, 1 Jun 2021 11:51:22 -0700 Subject: [PATCH 2/2] Formatting --- packages/auth/src/error_auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth/src/error_auth.js b/packages/auth/src/error_auth.js index 351d01e0301..84f6efff235 100644 --- a/packages/auth/src/error_auth.js +++ b/packages/auth/src/error_auth.js @@ -1,6 +1,6 @@ /** * @license - * Copyright 2017 Google Inc. + * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.