You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

484 lines
21 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "FIRAuthErrors.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. /** @var FIRAuthPublicErrorCodeFlag
  20. @brief Bitmask value indicating the error represents a public error code when this bit is
  21. zeroed. Error codes which don't contain this flag will be wrapped in an @c NSError whose
  22. code is @c FIRAuthErrorCodeInternalError.
  23. */
  24. static const NSInteger FIRAuthPublicErrorCodeFlag = 1 << 20;
  25. /** @var FIRAuthInternalErrorDomain
  26. @brief The Firebase Auth error domain for internal errors.
  27. */
  28. extern NSString *const FIRAuthInternalErrorDomain;
  29. /** @var FIRAuthErrorUserInfoDeserializedResponseKey
  30. @brief Errors with the code @c FIRAuthErrorCodeUnexpectedResponseError,
  31. @c FIRAuthErrorCodeUnexpectedErrorResponseError, and
  32. @c FIRAuthInternalErrorCodeRPCResponseDecodingError may contain an @c NSError.userInfo
  33. dictionary which contains this key. The value associated with this key is an object of
  34. unspecified contents containing the deserialized server response.
  35. */
  36. extern NSString *const FIRAuthErrorUserInfoDeserializedResponseKey;
  37. /** @var FIRAuthErrorUserInfoDataKey
  38. @brief Errors with the code @c FIRAuthErrorCodeUnexpectedResponseError or
  39. @c FIRAuthErrorCodeUnexpectedErrorResponseError may contain an @c NSError.userInfo
  40. dictionary which contains this key. The value associated with this key is an @c NSString
  41. which represents the response from a server to an RPC which could not be deserialized.
  42. */
  43. extern NSString *const FIRAuthErrorUserInfoDataKey;
  44. /** @var FIRAuthInternalErrorCode
  45. @brief Error codes used internally by Firebase Auth.
  46. @remarks All errors are generated using an internal error code. These errors are automatically
  47. converted to the appropriate public version of the @c NSError by the methods in
  48. @c FIRAuthErrorUtils
  49. */
  50. typedef NS_ENUM(NSInteger, FIRAuthInternalErrorCode) {
  51. /** @var FIRAuthInternalErrorCodeNetworkError
  52. @brief Indicates a network error occurred (such as a timeout, interrupted connection, or
  53. unreachable host.)
  54. @remarks These types of errors are often recoverable with a retry.
  55. See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details about
  56. the network error which occurred.
  57. */
  58. FIRAuthInternalErrorCodeNetworkError = FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeNetworkError,
  59. /** @var FIRAuthInternalErrorCodeEmailAlreadyInUse
  60. @brief The email used to attempt a sign-up already exists.
  61. */
  62. FIRAuthInternalErrorCodeEmailAlreadyInUse =
  63. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeEmailAlreadyInUse,
  64. /** @var FIRAuthInternalErrorCodeUserDisabled
  65. @brief Indicates the user's account is disabled on the server side.
  66. */
  67. FIRAuthInternalErrorCodeUserDisabled = FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeUserDisabled,
  68. /** @var FIRAuthInternalErrorCodeWrongPassword
  69. @brief Indicates the user attempted sign in with a wrong password
  70. */
  71. FIRAuthInternalErrorCodeWrongPassword =
  72. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeWrongPassword,
  73. /** @var FIRAuthInternalErrorCodeKeychainError
  74. @brief Indicates an error occurred accessing the keychain.
  75. @remarks The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo dictionary
  76. will contain more information about the error encountered.
  77. */
  78. FIRAuthInternalErrorCodeKeychainError =
  79. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeKeychainError,
  80. /** @var FIRAuthInternalErrorCodeMissingClientIdentifier
  81. @brief Indicates an error for when the client identifier is missing.
  82. */
  83. FIRAuthInternalErrorCodeMissingClientIdentifier =
  84. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingClientIdentifier,
  85. /** @var FIRAuthInternalErrorCodeInternalError
  86. @brief An internal error occurred.
  87. @remarks This value is here for consistency. It's also used to make the implementation of
  88. wrapping internal errors simpler.
  89. */
  90. FIRAuthInternalErrorCodeInternalError =
  91. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInternalError,
  92. /** @var FIRAuthInternalErrorCodeTooManyRequests
  93. @brief Indicates that too many requests were made to a server method.
  94. */
  95. FIRAuthInternalErrorCodeTooManyRequests =
  96. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeTooManyRequests,
  97. /** @var FIRAuthInternalErrorCodeInvalidCustomToken
  98. @brief Indicates a validation error with the custom token.
  99. */
  100. FIRAuthInternalErrorCodeInvalidCustomToken =
  101. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidCustomToken,
  102. /** @var FIRAuthInternalErrorCodeCredentialMismatch
  103. @brief Indicates the service account and the API key belong to different projects.
  104. */
  105. FIRAuthInternalErrorCodeCustomTokenMismatch =
  106. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeCustomTokenMismatch,
  107. /** @var FIRAuthInternalErrorCodeInvalidCredential
  108. @brief Indicates the IDP token or requestUri is invalid.
  109. */
  110. FIRAuthInternalErrorCodeInvalidCredential =
  111. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidCredential,
  112. /** @var FIRAuthInternalErrorCodeRequiresRecentLogin
  113. @brief Indicates the user has attemped to change email or password more than 5 minutes after
  114. signing in.
  115. */
  116. FIRAuthInternalErrorCodeRequiresRecentLogin =
  117. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeRequiresRecentLogin,
  118. /** @var FIRAuthInternalErrorCodeInvalidUserToken
  119. @brief Indicates user's saved auth credential is invalid, the user needs to sign in again.
  120. */
  121. FIRAuthInternalErrorCodeInvalidUserToken =
  122. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidUserToken,
  123. /** @var FIRAuthInternalErrorCodeInvalidEmail
  124. @brief Indicates the email identifier is invalid.
  125. */
  126. FIRAuthInternalErrorCodeInvalidEmail =
  127. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidEmail,
  128. /** @var FIRAuthInternalErrorCodeAccountExistsWithDifferentCredential
  129. @brief Indicates account linking is needed.
  130. */
  131. FIRAuthInternalErrorCodeAccountExistsWithDifferentCredential =
  132. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeAccountExistsWithDifferentCredential,
  133. /** @var FIRAuthInternalErrorCodeProviderAlreadyLinked
  134. @brief Indicates an attempt to link a provider to which we are already linked.
  135. */
  136. FIRAuthInternalErrorCodeProviderAlreadyLinked =
  137. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeProviderAlreadyLinked,
  138. /** @var FIRAuthInternalErrorCodeNoSuchProvider
  139. @brief Indicates an attempt to unlink a provider that is not is not linked.
  140. */
  141. FIRAuthInternalErrorCodeNoSuchProvider =
  142. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeNoSuchProvider,
  143. /** @var FIRAuthInternalErrorCodeUserTokenExpired
  144. @brief Indicates the token issue time is older than account's valid_since time.
  145. */
  146. FIRAuthInternalErrorCodeUserTokenExpired =
  147. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeUserTokenExpired,
  148. /** @var FIRAuthInternalErrorCodeUserNotFound
  149. @brief Indicates the user account was been found.
  150. */
  151. FIRAuthInternalErrorCodeUserNotFound =
  152. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeUserNotFound,
  153. /** @var FIRAuthInternalErrorCodeInvalidAPIKey
  154. @brief Indicates an invalid API Key was supplied in the request.
  155. */
  156. FIRAuthInternalErrorCodeInvalidAPIKey =
  157. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidAPIKey,
  158. /** @var FIRAuthInternalErrorCodeOperationNotAllowed
  159. @brief Indicates that admin disabled sign-in with the specified IDP.
  160. */
  161. FIRAuthInternalErrorCodeOperationNotAllowed =
  162. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeOperationNotAllowed,
  163. /** @var FIRAuthInternalErrorCodeUserMismatch
  164. @brief Indicates that user attempted to reauthenticate with a user other than the current
  165. user.
  166. */
  167. FIRAuthInternalErrorCodeUserMismatch =
  168. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeUserMismatch,
  169. /** @var FIRAuthInternalErrorCodeCredentialAlreadyInUse
  170. @brief Indicates an attempt to link with a credential that has already been linked with a
  171. different Firebase account.
  172. */
  173. FIRAuthInternalErrorCodeCredentialAlreadyInUse =
  174. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeCredentialAlreadyInUse,
  175. /** @var FIRAuthInternalErrorCodeWeakPassword
  176. @brief Indicates an attempt to set a password that is considered too weak.
  177. */
  178. FIRAuthInternalErrorCodeWeakPassword =
  179. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeWeakPassword,
  180. /** @var FIRAuthInternalErrorCodeAppNotAuthorized
  181. @brief Indicates the App is not authorized to use Firebase Authentication with the
  182. provided API Key.
  183. */
  184. FIRAuthInternalErrorCodeAppNotAuthorized =
  185. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeAppNotAuthorized,
  186. /** @var FIRAuthInternalErrorCodeExpiredActionCode
  187. @brief Indicates the OOB code is expired.
  188. */
  189. FIRAuthInternalErrorCodeExpiredActionCode =
  190. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeExpiredActionCode,
  191. /** @var FIRAuthInternalErrorCodeInvalidActionCode
  192. @brief Indicates the OOB code is invalid.
  193. */
  194. FIRAuthInternalErrorCodeInvalidActionCode =
  195. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidActionCode,
  196. /** Indicates that there are invalid parameters in the payload during a "send password reset email
  197. * " attempt.
  198. */
  199. FIRAuthInternalErrorCodeInvalidMessagePayload =
  200. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidMessagePayload,
  201. /** Indicates that the sender email is invalid during a "send password reset email" attempt.
  202. */
  203. FIRAuthInternalErrorCodeInvalidSender =
  204. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidSender,
  205. /** Indicates that the recipient email is invalid.
  206. */
  207. FIRAuthInternalErrorCodeInvalidRecipientEmail =
  208. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidRecipientEmail,
  209. /** Indicates that the iOS bundle ID is missing when a iOS App Store ID is provided.
  210. */
  211. FIRAuthinternalErrorCodeMissingIosBundleID =
  212. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingIosBundleID,
  213. /** Indicates that the android package name is missing when the @c androidInstallApp flag is set
  214. to true.
  215. */
  216. FIRAuthInternalErrorCodeMissingAndroidPackageName =
  217. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingAndroidPackageName,
  218. /** Indicates that the domain specified in the continue URL is not whitelisted in the Firebase
  219. console.
  220. */
  221. FIRAuthInternalErrorCodeUnauthorizedDomain =
  222. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeUnauthorizedDomain,
  223. /** Indicates that the domain specified in the continue URI is not valid.
  224. */
  225. FIRAuthInternalErrorCodeInvalidContinueURI =
  226. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidContinueURI,
  227. /** Indicates that a continue URI was not provided in a request to the backend which requires
  228. one.
  229. */
  230. FIRAuthInternalErrorCodeMissingContinueURI =
  231. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingContinueURI,
  232. /** Indicates that an email address was expected but one was not provided.
  233. */
  234. FIRAuthInternalErrorCodeMissingEmail =
  235. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingEmail,
  236. /** Indicates that a phone number was not provided in a call to @c verifyPhoneNumber:completion:.
  237. */
  238. FIRAuthInternalErrorCodeMissingPhoneNumber =
  239. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingPhoneNumber,
  240. /** Indicates that an invalid phone number was provided in a call to @c
  241. verifyPhoneNumber:completion:.
  242. */
  243. FIRAuthInternalErrorCodeInvalidPhoneNumber =
  244. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidPhoneNumber,
  245. /** Indicates that the phone auth credential was created with an empty verification code.
  246. */
  247. FIRAuthInternalErrorCodeMissingVerificationCode =
  248. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingVerificationCode,
  249. /** Indicates that an invalid verification code was used in the verifyPhoneNumber request.
  250. */
  251. FIRAuthInternalErrorCodeInvalidVerificationCode =
  252. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidVerificationCode,
  253. /** Indicates that the phone auth credential was created with an empty verification ID.
  254. */
  255. FIRAuthInternalErrorCodeMissingVerificationID =
  256. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingVerificationID,
  257. /** Indicates that the APNS device token is missing in the verifyClient request.
  258. */
  259. FIRAuthInternalErrorCodeMissingAppCredential =
  260. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingAppCredential,
  261. /** Indicates that an invalid APNS device token was used in the verifyClient request.
  262. */
  263. FIRAuthInternalErrorCodeInvalidAppCredential =
  264. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidAppCredential,
  265. /** Indicates that the reCAPTCHA token is not valid.
  266. */
  267. FIRAuthInternalErrorCodeCaptchaCheckFailed =
  268. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeCaptchaCheckFailed,
  269. /** Indicates that an invalid verification ID was used in the verifyPhoneNumber request.
  270. */
  271. FIRAuthInternalErrorCodeInvalidVerificationID =
  272. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidVerificationID,
  273. /** Indicates that the quota of SMS messages for a given project has been exceeded.
  274. */
  275. FIRAuthInternalErrorCodeQuotaExceeded =
  276. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeQuotaExceeded,
  277. /** Indicates that an attempt was made to present a new web context while one was already being
  278. presented.
  279. */
  280. FIRAuthInternalErrorCodeWebContextAlreadyPresented =
  281. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeWebContextAlreadyPresented,
  282. /** Indicates that the URL presentation was cancelled prematurely by the user.
  283. */
  284. FIRAuthInternalErrorCodeWebContextCancelled =
  285. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeWebContextCancelled,
  286. /** Indicates a general failure during the app verification flow.
  287. */
  288. FIRAuthInternalErrorCodeAppVerificationUserInteractionFailure =
  289. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeAppVerificationUserInteractionFailure,
  290. /** Indicates that the clientID used to invoke a web flow is invalid.
  291. */
  292. FIRAuthInternalErrorCodeInvalidClientID =
  293. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidClientID,
  294. /** Indicates that a network request within a SFSafariViewController or WKWebView failed.
  295. */
  296. FIRAuthInternalErrorCodeWebNetworkRequestFailed =
  297. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeWebNetworkRequestFailed,
  298. /** Indicates that an internal error occurred within a SFSafariViewController or WKWebView.
  299. */
  300. FIRAuthInternalErrorCodeWebInternalError =
  301. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeWebInternalError,
  302. /** Indicates that an internal error occurred within a SFSafariViewController or WKWebView.
  303. */
  304. FIRAuthInternalErrorCodeWebSignInUserInteractionFailure =
  305. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeWebSignInUserInteractionFailure,
  306. // The enum values between 17046 and 17051 are reserved and should NOT be used for new error
  307. // codes.
  308. /** Indicates that the SMS code has expired
  309. */
  310. FIRAuthInternalErrorCodeSessionExpired =
  311. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeSessionExpired,
  312. FIRAuthInternalErrorCodeMissingAppToken =
  313. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingAppToken,
  314. FIRAuthInternalErrorCodeNotificationNotForwarded =
  315. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeNotificationNotForwarded,
  316. FIRAuthInternalErrorCodeAppNotVerified =
  317. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeAppNotVerified,
  318. /** Indicates that the Game Center local player was not authenticated.
  319. */
  320. FIRAuthInternalErrorCodeLocalPlayerNotAuthenticated =
  321. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeLocalPlayerNotAuthenticated,
  322. /** Indicates that the Game Center local player was not authenticated.
  323. */
  324. FIRAuthInternalErrorCodeGameKitNotLinked =
  325. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeGameKitNotLinked,
  326. /** Indicates that the nonce is missing or invalid.
  327. */
  328. FIRAuthInternalErrorCodeMissingOrInvalidNonce =
  329. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMissingOrInvalidNonce,
  330. /** Indicates that a non-null user was expected as an argmument to the operation but a null
  331. user was provided.
  332. */
  333. FIRAuthInternalErrorCodeNullUser =
  334. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeNullUser,
  335. /** Indicates that the provider id given for the web operation is invalid.
  336. */
  337. FIRAuthInternalErrorCodeInvalidProviderID =
  338. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidProviderID,
  339. /** Indicates that the Firebase Dynamic Link domain used is either not configured or is unauthorized
  340. for the current project.
  341. */
  342. FIRAuthInternalErrorCodeInvalidDynamicLinkDomain =
  343. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidDynamicLinkDomain,
  344. FIRAuthInternalErrorCodeMalformedJWT =
  345. FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMalformedJWT,
  346. /** @var FIRAuthInternalErrorCodeRPCRequestEncodingError
  347. @brief Indicates an error encoding the RPC request.
  348. @remarks This is typically due to some sort of unexpected input value.
  349. See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details.
  350. */
  351. FIRAuthInternalErrorCodeRPCRequestEncodingError = 1,
  352. /** @var FIRAuthInternalErrorCodeJSONSerializationError
  353. @brief Indicates an error serializing an RPC request.
  354. @remarks This is typically due to some sort of unexpected input value.
  355. If an @c NSJSONSerialization.isValidJSONObject: check fails, the error will contain no
  356. @c NSUnderlyingError key in the @c NSError.userInfo dictionary. If an error was
  357. encountered calling @c NSJSONSerialization.dataWithJSONObject:options:error:, the
  358. resulting error will be associated with the @c NSUnderlyingError key in the
  359. @c NSError.userInfo dictionary.
  360. */
  361. FIRAuthInternalErrorCodeJSONSerializationError = 2,
  362. /** @var FIRAuthInternalErrorCodeUnexpectedErrorResponse
  363. @brief Indicates an HTTP error occurred and the data returned either couldn't be deserialized
  364. or couldn't be decoded.
  365. @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details
  366. about the HTTP error which occurred.
  367. If the response could be deserialized as JSON then the @c NSError.userInfo dictionary will
  368. contain a value for the key @c FIRAuthErrorUserInfoDeserializedResponseKey which is the
  369. deserialized response value.
  370. If the response could not be deserialized as JSON then the @c NSError.userInfo dictionary
  371. will contain values for the @c NSUnderlyingErrorKey and @c FIRAuthErrorUserInfoDataKey
  372. keys.
  373. */
  374. FIRAuthInternalErrorCodeUnexpectedErrorResponse = 3,
  375. /** @var FIRAuthInternalErrorCodeUnexpectedResponse
  376. @brief Indicates the HTTP response indicated the request was a successes, but the response
  377. contains something other than a JSON-encoded dictionary, or the data type of the response
  378. indicated it is different from the type of response we expected.
  379. @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary.
  380. If this key is present in the dictionary, it may contain an error from
  381. @c NSJSONSerialization error (indicating the response received was of the wrong data
  382. type).
  383. See the @c FIRAuthErrorUserInfoDeserializedResponseKey value in the @c NSError.userInfo
  384. dictionary. If the response could be deserialized, it's deserialized representation will
  385. be associated with this key. If the @c NSUnderlyingError value in the @c NSError.userInfo
  386. dictionary is @c nil, this indicates the JSON didn't represent a dictionary.
  387. */
  388. FIRAuthInternalErrorCodeUnexpectedResponse = 4,
  389. /** @var FIRAuthInternalErrorCodeRPCResponseDecodingError
  390. @brief Indicates an error decoding the RPC response.
  391. This is typically due to some sort of unexpected response value from the server.
  392. @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details.
  393. See the @c FIRErrorUserInfoDecodedResponseKey value in the @c NSError.userInfo dictionary.
  394. The deserialized representation of the response will be associated with this key.
  395. */
  396. FIRAuthInternalErrorCodeRPCResponseDecodingError = 5,
  397. };
  398. NS_ASSUME_NONNULL_END