AuthInternalErrors.swift 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. // Copyright 2023 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. import Foundation
  15. /** @var FIRAuthPublicErrorCodeFlag
  16. @brief Bitmask value indicating the error represents a public error code when this bit is
  17. zeroed. Error codes which don't contain this flag will be wrapped in an @c NSError whose
  18. code is @c FIRAuthErrorCodeInternalError.
  19. */
  20. let FIRAuthPublicErrorCodeFlag: Int = 1 << 20
  21. /** @var FIRAuthInternalErrorCode
  22. @brief Error codes used internally by Firebase Auth.
  23. @remarks All errors are generated using an internal error code. These errors are automatically
  24. converted to the appropriate public version of the @c NSError by the methods in
  25. @c FIRAuthErrorUtils
  26. */
  27. enum SharedErrorCode {
  28. case `public`(AuthErrorCode)
  29. case `internal`(AuthInternalErrorCode)
  30. }
  31. @objc(FIRAuthInternalErrorCode) public enum AuthInternalErrorCode: Int {
  32. case networkError = 17020
  33. /** @var FIRAuthInternalErrorCodeRPCRequestEncodingError
  34. @brief Indicates an error encoding the RPC request.
  35. @remarks This is typically due to some sort of unexpected input value.
  36. See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details.
  37. */
  38. case RPCRequestEncodingError = 1
  39. /** @var FIRAuthInternalErrorCodeJSONSerializationError
  40. @brief Indicates an error serializing an RPC request.
  41. @remarks This is typically due to some sort of unexpected input value.
  42. If an @c NSJSONSerialization.isValidJSONObject: check fails, the error will contain no
  43. @c NSUnderlyingError key in the @c NSError.userInfo dictionary. If an error was
  44. encountered calling @c NSJSONSerialization.dataWithJSONObject:options:error:, the
  45. resulting error will be associated with the @c NSUnderlyingError key in the
  46. @c NSError.userInfo dictionary.
  47. */
  48. case JSONSerializationError = 2
  49. /** @var FIRAuthInternalErrorCodeUnexpectedErrorResponse
  50. @brief Indicates an HTTP error occurred and the data returned either couldn't be deserialized
  51. or couldn't be decoded.
  52. @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details
  53. about the HTTP error which occurred.
  54. If the response could be deserialized as JSON then the @c NSError.userInfo dictionary will
  55. contain a value for the key @c FIRAuthErrorUserInfoDeserializedResponseKey which is the
  56. deserialized response value.
  57. If the response could not be deserialized as JSON then the @c NSError.userInfo dictionary
  58. will contain values for the @c NSUnderlyingErrorKey and @c FIRAuthErrorUserInfoDataKey
  59. keys.
  60. */
  61. case unexpectedErrorResponse = 3
  62. /** @var FIRAuthInternalErrorCodeUnexpectedResponse
  63. @brief Indicates the HTTP response indicated the request was a successes, but the response
  64. contains something other than a JSON-encoded dictionary, or the data type of the response
  65. indicated it is different from the type of response we expected.
  66. @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary.
  67. If this key is present in the dictionary, it may contain an error from
  68. @c NSJSONSerialization error (indicating the response received was of the wrong data
  69. type).
  70. See the @c FIRAuthErrorUserInfoDeserializedResponseKey value in the @c NSError.userInfo
  71. dictionary. If the response could be deserialized, it's deserialized representation will
  72. be associated with this key. If the @c NSUnderlyingError value in the @c NSError.userInfo
  73. dictionary is @c nil, this indicates the JSON didn't represent a dictionary.
  74. */
  75. case unexpectedResponse = 4
  76. /** @var FIRAuthInternalErrorCodeRPCResponseDecodingError
  77. @brief Indicates an error decoding the RPC response.
  78. This is typically due to some sort of unexpected response value from the server.
  79. @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details.
  80. See the @c FIRErrorUserInfoDecodedResponseKey value in the @c NSError.userInfo dictionary.
  81. The deserialized representation of the response will be associated with this key.
  82. */
  83. case RPCResponseDecodingError = 5
  84. }
  85. // typedef NS_ENUM(NSInteger, FIRAuthInternalErrorCode) {
  86. // /** @var FIRAuthInternalErrorCodeNetworkError
  87. // @brief Indicates a network error occurred (such as a timeout, interrupted connection, or
  88. // unreachable host.)
  89. // @remarks These types of errors are often recoverable with a retry.
  90. //
  91. // See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details
  92. // about the network error which occurred.
  93. // */
  94. // FIRAuthInternalErrorCodeNetworkError = FIRAuthPublicErrorCodeFlag |
  95. // FIRAuthErrorCodeNetworkError,
  96. //
  97. // /** @var FIRAuthInternalErrorCodeEmailAlreadyInUse
  98. // @brief The email used to attempt a sign-up already exists.
  99. // */
  100. // FIRAuthInternalErrorCodeEmailAlreadyInUse = FIRAuthPublicErrorCodeFlag |
  101. // FIRAuthErrorCodeEmailAlreadyInUse,
  102. //
  103. // /** @var FIRAuthInternalErrorCodeUserDisabled
  104. // @brief Indicates the user's account is disabled on the server side.
  105. // */
  106. // FIRAuthInternalErrorCodeUserDisabled = FIRAuthPublicErrorCodeFlag |
  107. // FIRAuthErrorCodeUserDisabled,
  108. //
  109. // /** @var FIRAuthInternalErrorCodeWrongPassword
  110. // @brief Indicates the user attempted sign in with a wrong password
  111. // */
  112. // FIRAuthInternalErrorCodeWrongPassword = FIRAuthPublicErrorCodeFlag |
  113. // FIRAuthErrorCodeWrongPassword,
  114. //
  115. // /** @var FIRAuthInternalErrorCodeKeychainError
  116. // @brief Indicates an error occurred accessing the keychain.
  117. // @remarks The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo
  118. // dictionary
  119. // will contain more information about the error encountered.
  120. // */
  121. // FIRAuthInternalErrorCodeKeychainError = FIRAuthPublicErrorCodeFlag |
  122. // FIRAuthErrorCodeKeychainError,
  123. //
  124. // /** @var FIRAuthInternalErrorCodeMissingClientIdentifier
  125. // @brief Indicates an error for when the client identifier is missing.
  126. // */
  127. // FIRAuthInternalErrorCodeMissingClientIdentifier = FIRAuthPublicErrorCodeFlag |
  128. // FIRAuthErrorCodeMissingClientIdentifier,
  129. //
  130. // /** @var FIRAuthInternalErrorCodeInternalError
  131. // @brief An internal error occurred.
  132. // @remarks This value is here for consistency. It's also used to make the implementation of
  133. // wrapping internal errors simpler.
  134. // */
  135. // FIRAuthInternalErrorCodeInternalError = FIRAuthPublicErrorCodeFlag |
  136. // FIRAuthErrorCodeInternalError,
  137. //
  138. // /** @var FIRAuthInternalErrorCodeTooManyRequests
  139. // @brief Indicates that too many requests were made to a server method.
  140. // */
  141. // FIRAuthInternalErrorCodeTooManyRequests = FIRAuthPublicErrorCodeFlag |
  142. // FIRAuthErrorCodeTooManyRequests,
  143. //
  144. // /** @var FIRAuthInternalErrorCodeInvalidCustomToken
  145. // @brief Indicates a validation error with the custom token.
  146. // */
  147. // FIRAuthInternalErrorCodeInvalidCustomToken = FIRAuthPublicErrorCodeFlag |
  148. // FIRAuthErrorCodeInvalidCustomToken,
  149. //
  150. // /** @var FIRAuthInternalErrorCodeCredentialMismatch
  151. // @brief Indicates the service account and the API key belong to different projects.
  152. // */
  153. // FIRAuthInternalErrorCodeCustomTokenMismatch = FIRAuthPublicErrorCodeFlag |
  154. // FIRAuthErrorCodeCustomTokenMismatch,
  155. //
  156. // /** @var FIRAuthInternalErrorCodeInvalidCredential
  157. // @brief Indicates the IDP token or requestUri is invalid.
  158. // */
  159. // FIRAuthInternalErrorCodeInvalidCredential = FIRAuthPublicErrorCodeFlag |
  160. // FIRAuthErrorCodeInvalidCredential,
  161. //
  162. // /** @var FIRAuthInternalErrorCodeRequiresRecentLogin
  163. // @brief Indicates the user has attemped to change email or password more than 5 minutes
  164. // after
  165. // signing in.
  166. // */
  167. // FIRAuthInternalErrorCodeRequiresRecentLogin = FIRAuthPublicErrorCodeFlag |
  168. // FIRAuthErrorCodeRequiresRecentLogin,
  169. //
  170. // /** @var FIRAuthInternalErrorCodeInvalidUserToken
  171. // @brief Indicates user's saved auth credential is invalid, the user needs to sign in again.
  172. // */
  173. // FIRAuthInternalErrorCodeInvalidUserToken = FIRAuthPublicErrorCodeFlag |
  174. // FIRAuthErrorCodeInvalidUserToken,
  175. //
  176. // /** @var FIRAuthInternalErrorCodeInvalidEmail
  177. // @brief Indicates the email identifier is invalid.
  178. // */
  179. // FIRAuthInternalErrorCodeInvalidEmail = FIRAuthPublicErrorCodeFlag |
  180. // FIRAuthErrorCodeInvalidEmail,
  181. //
  182. // /** @var FIRAuthInternalErrorCodeAccountExistsWithDifferentCredential
  183. // @brief Indicates account linking is needed.
  184. // */
  185. // FIRAuthInternalErrorCodeAccountExistsWithDifferentCredential =
  186. // FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeAccountExistsWithDifferentCredential,
  187. //
  188. // /** @var FIRAuthInternalErrorCodeProviderAlreadyLinked
  189. // @brief Indicates an attempt to link a provider to which we are already linked.
  190. // */
  191. // FIRAuthInternalErrorCodeProviderAlreadyLinked = FIRAuthPublicErrorCodeFlag |
  192. // FIRAuthErrorCodeProviderAlreadyLinked,
  193. //
  194. // /** @var FIRAuthInternalErrorCodeNoSuchProvider
  195. // @brief Indicates an attempt to unlink a provider that is not is not linked.
  196. // */
  197. // FIRAuthInternalErrorCodeNoSuchProvider = FIRAuthPublicErrorCodeFlag |
  198. // FIRAuthErrorCodeNoSuchProvider,
  199. //
  200. // /** @var FIRAuthInternalErrorCodeUserTokenExpired
  201. // @brief Indicates the token issue time is older than account's valid_since time.
  202. // */
  203. // FIRAuthInternalErrorCodeUserTokenExpired = FIRAuthPublicErrorCodeFlag |
  204. // FIRAuthErrorCodeUserTokenExpired,
  205. //
  206. // /** @var FIRAuthInternalErrorCodeUserNotFound
  207. // @brief Indicates the user account was been found.
  208. // */
  209. // FIRAuthInternalErrorCodeUserNotFound = FIRAuthPublicErrorCodeFlag |
  210. // FIRAuthErrorCodeUserNotFound,
  211. //
  212. // /** @var FIRAuthInternalErrorCodeInvalidAPIKey
  213. // @brief Indicates an invalid API Key was supplied in the request.
  214. // */
  215. // FIRAuthInternalErrorCodeInvalidAPIKey = FIRAuthPublicErrorCodeFlag |
  216. // FIRAuthErrorCodeInvalidAPIKey,
  217. //
  218. // /** @var FIRAuthInternalErrorCodeOperationNotAllowed
  219. // @brief Indicates that admin disabled sign-in with the specified IDP.
  220. // */
  221. // FIRAuthInternalErrorCodeOperationNotAllowed = FIRAuthPublicErrorCodeFlag |
  222. // FIRAuthErrorCodeOperationNotAllowed,
  223. //
  224. // /** @var FIRAuthInternalErrorCodeUserMismatch
  225. // @brief Indicates that user attempted to reauthenticate with a user other than the current
  226. // user.
  227. // */
  228. // FIRAuthInternalErrorCodeUserMismatch = FIRAuthPublicErrorCodeFlag |
  229. // FIRAuthErrorCodeUserMismatch,
  230. //
  231. // /** @var FIRAuthInternalErrorCodeCredentialAlreadyInUse
  232. // @brief Indicates an attempt to link with a credential that has already been linked with a
  233. // different Firebase account.
  234. // */
  235. // FIRAuthInternalErrorCodeCredentialAlreadyInUse = FIRAuthPublicErrorCodeFlag |
  236. // FIRAuthErrorCodeCredentialAlreadyInUse,
  237. //
  238. // /** @var FIRAuthInternalErrorCodeWeakPassword
  239. // @brief Indicates an attempt to set a password that is considered too weak.
  240. // */
  241. // FIRAuthInternalErrorCodeWeakPassword = FIRAuthPublicErrorCodeFlag |
  242. // FIRAuthErrorCodeWeakPassword,
  243. //
  244. // /** @var FIRAuthInternalErrorCodeAppNotAuthorized
  245. // @brief Indicates the App is not authorized to use Firebase Authentication with the
  246. // provided API Key.
  247. // */
  248. // FIRAuthInternalErrorCodeAppNotAuthorized = FIRAuthPublicErrorCodeFlag |
  249. // FIRAuthErrorCodeAppNotAuthorized,
  250. //
  251. // /** @var FIRAuthInternalErrorCodeExpiredActionCode
  252. // @brief Indicates the OOB code is expired.
  253. // */
  254. // FIRAuthInternalErrorCodeExpiredActionCode = FIRAuthPublicErrorCodeFlag |
  255. // FIRAuthErrorCodeExpiredActionCode,
  256. //
  257. // /** @var FIRAuthInternalErrorCodeInvalidActionCode
  258. // @brief Indicates the OOB code is invalid.
  259. // */
  260. // FIRAuthInternalErrorCodeInvalidActionCode = FIRAuthPublicErrorCodeFlag |
  261. // FIRAuthErrorCodeInvalidActionCode,
  262. //
  263. // /** Indicates that there are invalid parameters in the payload during a "send password reset
  264. // /email
  265. // * " attempt.
  266. // */
  267. // FIRAuthInternalErrorCodeInvalidMessagePayload = FIRAuthPublicErrorCodeFlag |
  268. // FIRAuthErrorCodeInvalidMessagePayload,
  269. //
  270. // /** Indicates that the sender email is invalid during a "send password reset email" attempt.
  271. // */
  272. // FIRAuthInternalErrorCodeInvalidSender = FIRAuthPublicErrorCodeFlag |
  273. // FIRAuthErrorCodeInvalidSender,
  274. //
  275. // /** Indicates that the recipient email is invalid.
  276. // */
  277. // FIRAuthInternalErrorCodeInvalidRecipientEmail = FIRAuthPublicErrorCodeFlag |
  278. // FIRAuthErrorCodeInvalidRecipientEmail,
  279. //
  280. // /** Indicates that the iOS bundle ID is missing when a iOS App Store ID is provided.
  281. // */
  282. // FIRAuthinternalErrorCodeMissingIosBundleID = FIRAuthPublicErrorCodeFlag |
  283. // FIRAuthErrorCodeMissingIosBundleID,
  284. //
  285. // /** Indicates that the android package name is missing when the @c androidInstallApp flag is
  286. // /set
  287. // to true.
  288. // */
  289. // FIRAuthInternalErrorCodeMissingAndroidPackageName = FIRAuthPublicErrorCodeFlag |
  290. // FIRAuthErrorCodeMissingAndroidPackageName,
  291. //
  292. // /** Indicates that the domain specified in the continue URL is not allowlisted in the Firebase
  293. // console.
  294. // */
  295. // FIRAuthInternalErrorCodeUnauthorizedDomain = FIRAuthPublicErrorCodeFlag |
  296. // FIRAuthErrorCodeUnauthorizedDomain,
  297. //
  298. // /** Indicates that the domain specified in the continue URI is not valid.
  299. // */
  300. // FIRAuthInternalErrorCodeInvalidContinueURI = FIRAuthPublicErrorCodeFlag |
  301. // FIRAuthErrorCodeInvalidContinueURI,
  302. //
  303. // /** Indicates that a continue URI was not provided in a request to the backend which requires
  304. // one.
  305. // */
  306. // FIRAuthInternalErrorCodeMissingContinueURI = FIRAuthPublicErrorCodeFlag |
  307. // FIRAuthErrorCodeMissingContinueURI,
  308. //
  309. // /** Indicates that an email address was expected but one was not provided.
  310. // */
  311. // FIRAuthInternalErrorCodeMissingEmail = FIRAuthPublicErrorCodeFlag |
  312. // FIRAuthErrorCodeMissingEmail,
  313. //
  314. // /** Indicates that a phone number was not provided in a call to @c
  315. // /verifyPhoneNumber:completion:.
  316. // */
  317. // FIRAuthInternalErrorCodeMissingPhoneNumber = FIRAuthPublicErrorCodeFlag |
  318. // FIRAuthErrorCodeMissingPhoneNumber,
  319. //
  320. // /** Indicates that an invalid phone number was provided in a call to @c
  321. // verifyPhoneNumber:completion:.
  322. // */
  323. // FIRAuthInternalErrorCodeInvalidPhoneNumber = FIRAuthPublicErrorCodeFlag |
  324. // FIRAuthErrorCodeInvalidPhoneNumber,
  325. //
  326. // /** Indicates that the phone auth credential was created with an empty verification code.
  327. // */
  328. // FIRAuthInternalErrorCodeMissingVerificationCode = FIRAuthPublicErrorCodeFlag |
  329. // FIRAuthErrorCodeMissingVerificationCode,
  330. //
  331. // /** Indicates that an invalid verification code was used in the verifyPhoneNumber request.
  332. // */
  333. // FIRAuthInternalErrorCodeInvalidVerificationCode = FIRAuthPublicErrorCodeFlag |
  334. // FIRAuthErrorCodeInvalidVerificationCode,
  335. //
  336. // /** Indicates that the phone auth credential was created with an empty verification ID.
  337. // */
  338. // FIRAuthInternalErrorCodeMissingVerificationID = FIRAuthPublicErrorCodeFlag |
  339. // FIRAuthErrorCodeMissingVerificationID,
  340. //
  341. // /** Indicates that the APNS device token is missing in the verifyClient request.
  342. // */
  343. // FIRAuthInternalErrorCodeMissingAppCredential = FIRAuthPublicErrorCodeFlag |
  344. // FIRAuthErrorCodeMissingAppCredential,
  345. //
  346. // /** Indicates that an invalid APNS device token was used in the verifyClient request.
  347. // */
  348. // FIRAuthInternalErrorCodeInvalidAppCredential = FIRAuthPublicErrorCodeFlag |
  349. // FIRAuthErrorCodeInvalidAppCredential,
  350. //
  351. // /** Indicates that the reCAPTCHA token is not valid.
  352. // */
  353. // FIRAuthInternalErrorCodeCaptchaCheckFailed = FIRAuthPublicErrorCodeFlag |
  354. // FIRAuthErrorCodeCaptchaCheckFailed,
  355. //
  356. // /** Indicates that an invalid verification ID was used in the verifyPhoneNumber request.
  357. // */
  358. // FIRAuthInternalErrorCodeInvalidVerificationID = FIRAuthPublicErrorCodeFlag |
  359. // FIRAuthErrorCodeInvalidVerificationID,
  360. //
  361. // /** Indicates that the quota of SMS messages for a given project has been exceeded.
  362. // */
  363. // FIRAuthInternalErrorCodeQuotaExceeded = FIRAuthPublicErrorCodeFlag |
  364. // FIRAuthErrorCodeQuotaExceeded,
  365. //
  366. // /** Indicates that an attempt was made to present a new web context while one was already being
  367. // presented.
  368. // */
  369. // FIRAuthInternalErrorCodeWebContextAlreadyPresented = FIRAuthPublicErrorCodeFlag |
  370. // FIRAuthErrorCodeWebContextAlreadyPresented,
  371. //
  372. // /** Indicates that the URL presentation was cancelled prematurely by the user.
  373. // */
  374. // FIRAuthInternalErrorCodeWebContextCancelled = FIRAuthPublicErrorCodeFlag |
  375. // FIRAuthErrorCodeWebContextCancelled,
  376. //
  377. // /** Indicates a general failure during the app verification flow.
  378. // */
  379. // FIRAuthInternalErrorCodeAppVerificationUserInteractionFailure =
  380. // FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeAppVerificationUserInteractionFailure,
  381. //
  382. // /** Indicates that the clientID used to invoke a web flow is invalid.
  383. // */
  384. // FIRAuthInternalErrorCodeInvalidClientID = FIRAuthPublicErrorCodeFlag |
  385. // FIRAuthErrorCodeInvalidClientID,
  386. //
  387. // /** Indicates that a network request within a SFSafariViewController or WKWebView failed.
  388. // */
  389. // FIRAuthInternalErrorCodeWebNetworkRequestFailed = FIRAuthPublicErrorCodeFlag |
  390. // FIRAuthErrorCodeWebNetworkRequestFailed,
  391. //
  392. // /** Indicates that an internal error occurred within a SFSafariViewController or WKWebView.
  393. // */
  394. // FIRAuthInternalErrorCodeWebInternalError = FIRAuthPublicErrorCodeFlag |
  395. // FIRAuthErrorCodeWebInternalError,
  396. //
  397. // /** Indicates that an internal error occurred within a SFSafariViewController or WKWebView.
  398. // */
  399. // FIRAuthInternalErrorCodeWebSignInUserInteractionFailure =
  400. // FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeWebSignInUserInteractionFailure,
  401. //
  402. // // The enum values between 17046 and 17051 are reserved and should NOT be used for new error
  403. // // codes.
  404. //
  405. // /** Indicates that the SMS code has expired
  406. // */
  407. // FIRAuthInternalErrorCodeSessionExpired = FIRAuthPublicErrorCodeFlag |
  408. // FIRAuthErrorCodeSessionExpired,
  409. //
  410. // FIRAuthInternalErrorCodeMissingAppToken = FIRAuthPublicErrorCodeFlag |
  411. // FIRAuthErrorCodeMissingAppToken,
  412. //
  413. // FIRAuthInternalErrorCodeNotificationNotForwarded = FIRAuthPublicErrorCodeFlag |
  414. // FIRAuthErrorCodeNotificationNotForwarded,
  415. //
  416. // FIRAuthInternalErrorCodeAppNotVerified = FIRAuthPublicErrorCodeFlag |
  417. // FIRAuthErrorCodeAppNotVerified,
  418. //
  419. // /** Indicates that the Game Center local player was not authenticated.
  420. // */
  421. // FIRAuthInternalErrorCodeLocalPlayerNotAuthenticated = FIRAuthPublicErrorCodeFlag |
  422. // FIRAuthErrorCodeLocalPlayerNotAuthenticated,
  423. //
  424. // /** Indicates that the Game Center local player was not authenticated.
  425. // */
  426. // FIRAuthInternalErrorCodeGameKitNotLinked = FIRAuthPublicErrorCodeFlag |
  427. // FIRAuthErrorCodeGameKitNotLinked,
  428. //
  429. // /** Indicates that the second factor is required for sign in.
  430. // */
  431. // FIRAuthInternalErrorCodeSecondFactorRequired = FIRAuthPublicErrorCodeFlag |
  432. // FIRAuthErrorCodeSecondFactorRequired,
  433. //
  434. // /** Indicates that the multi factor session is missing.
  435. // */
  436. // FIRAuthInternalErrorCodeMissingMultiFactorSession = FIRAuthPublicErrorCodeFlag |
  437. // FIRAuthErrorCodeMissingMultiFactorSession,
  438. //
  439. // /** Indicates that the multi factor info is missing.
  440. // */
  441. // FIRAuthInternalErrorCodeMissingMultiFactorInfo = FIRAuthPublicErrorCodeFlag |
  442. // FIRAuthErrorCodeMissingMultiFactorInfo,
  443. //
  444. // /** Indicates that the multi factor session is invalid.
  445. // */
  446. // FIRAuthInternalErrorCodeInvalidMultiFactorSession = FIRAuthPublicErrorCodeFlag |
  447. // FIRAuthErrorCodeInvalidMultiFactorSession,
  448. //
  449. // /** Indicates that the multi factor info is not found.
  450. // */
  451. // FIRAuthInternalErrorCodeMultiFactorInfoNotFound = FIRAuthPublicErrorCodeFlag |
  452. // FIRAuthErrorCodeMultiFactorInfoNotFound,
  453. //
  454. // /** Indicates that the operation is admin only.
  455. // */
  456. // FIRAuthInternalErrorCodeAdminRestrictedOperation = FIRAuthPublicErrorCodeFlag |
  457. // FIRAuthErrorCodeAdminRestrictedOperation,
  458. //
  459. // /** Indicates that the email is unverified.
  460. // */
  461. // FIRAuthInternalErrorCodeUnverifiedEmail = FIRAuthPublicErrorCodeFlag |
  462. // FIRAuthErrorCodeUnverifiedEmail,
  463. //
  464. // /** Indicates that the second factor is already enrolled.
  465. // */
  466. // FIRAuthInternalErrorCodeSecondFactorAlreadyEnrolled = FIRAuthPublicErrorCodeFlag |
  467. // FIRAuthErrorCodeSecondFactorAlreadyEnrolled,
  468. //
  469. // /** Indicates that the number of multi factors reached the limit.
  470. // */
  471. // FIRAuthInternalErrorCodeMaximumSecondFactorCountExceeded =
  472. // FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMaximumSecondFactorCountExceeded,
  473. //
  474. // /** Indicates that the first factor is not supportted.
  475. // */
  476. // FIRAuthInternalErrorCodeUnsupportedFirstFactor = FIRAuthPublicErrorCodeFlag |
  477. // FIRAuthErrorCodeUnsupportedFirstFactor,
  478. //
  479. // /** Indicates that the email needs to be verified before changed.
  480. // */
  481. // FIRAuthInternalErrorCodeEmailChangeNeedsVerification =
  482. // FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeEmailChangeNeedsVerification,
  483. //
  484. // /** Indicates that the nonce is missing or invalid.
  485. // */
  486. // FIRAuthInternalErrorCodeMissingOrInvalidNonce = FIRAuthPublicErrorCodeFlag |
  487. // FIRAuthErrorCodeMissingOrInvalidNonce,
  488. //
  489. // /** Indicates that a non-null user was expected as an argmument to the operation but a null
  490. // user was provided.
  491. // */
  492. // FIRAuthInternalErrorCodeNullUser = FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeNullUser,
  493. //
  494. // /** Indicates that the provider id given for the web operation is invalid.
  495. // */
  496. // FIRAuthInternalErrorCodeInvalidProviderID = FIRAuthPublicErrorCodeFlag |
  497. // FIRAuthErrorCodeInvalidProviderID,
  498. //
  499. // /** @var FIRAuthInternalErrorCodeTenantIDMismatch
  500. // @brief Indicates an error occurred when an attempt is made to update the current user with
  501. // a
  502. // tenantId that differs from the current FirebaseAuth instance's tenantId.
  503. // */
  504. // FIRAuthInternalErrorCodeTenantIDMismatch = FIRAuthPublicErrorCodeFlag |
  505. // FIRAuthErrorCodeTenantIDMismatch,
  506. //
  507. // /** @var FIRAuthInternalErrorCodeUnsupportedTenantOperation
  508. // @brief Indicates an error occurred when operation is not supported in a multi-tenant
  509. // context.
  510. // */
  511. // FIRAuthInternalErrorCodeUnsupportedTenantOperation = FIRAuthPublicErrorCodeFlag |
  512. // FIRAuthErrorCodeUnsupportedTenantOperation,
  513. //
  514. // /** Indicates that the Firebase Dynamic Link domain used is either not configured or is
  515. // unauthorized for the current project.
  516. // */
  517. // FIRAuthInternalErrorCodeInvalidDynamicLinkDomain = FIRAuthPublicErrorCodeFlag |
  518. // FIRAuthErrorCodeInvalidDynamicLinkDomain,
  519. //
  520. // FIRAuthInternalErrorCodeMalformedJWT = FIRAuthPublicErrorCodeFlag |
  521. // FIRAuthErrorCodeMalformedJWT,
  522. //
  523. // /** @var FIRAuthInternalErrorCodeRPCRequestEncodingError
  524. // @brief Indicates an error encoding the RPC request.
  525. // @remarks This is typically due to some sort of unexpected input value.
  526. //
  527. // See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for details.
  528. // */
  529. // FIRAuthInternalErrorCodeRPCRequestEncodingError = 1,
  530. //
  531. // /** @var FIRAuthInternalErrorCodeJSONSerializationError
  532. // @brief Indicates an error serializing an RPC request.
  533. // @remarks This is typically due to some sort of unexpected input value.
  534. //
  535. // If an @c NSJSONSerialization.isValidJSONObject: check fails, the error will contain no
  536. // @c NSUnderlyingError key in the @c NSError.userInfo dictionary. If an error was
  537. // encountered calling @c NSJSONSerialization.dataWithJSONObject:options:error:, the
  538. // resulting error will be associated with the @c NSUnderlyingError key in the
  539. // @c NSError.userInfo dictionary.
  540. // */
  541. // FIRAuthInternalErrorCodeJSONSerializationError = 2,
  542. //
  543. // /** @var FIRAuthInternalErrorCodeUnexpectedErrorResponse
  544. // @brief Indicates an HTTP error occurred and the data returned either couldn't be
  545. // deserialized
  546. // or couldn't be decoded.
  547. // @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for
  548. // details
  549. // about the HTTP error which occurred.
  550. //
  551. // If the response could be deserialized as JSON then the @c NSError.userInfo dictionary
  552. // will
  553. // contain a value for the key @c FIRAuthErrorUserInfoDeserializedResponseKey which is the
  554. // deserialized response value.
  555. //
  556. // If the response could not be deserialized as JSON then the @c NSError.userInfo
  557. // dictionary
  558. // will contain values for the @c NSUnderlyingErrorKey and @c FIRAuthErrorUserInfoDataKey
  559. // keys.
  560. // */
  561. // FIRAuthInternalErrorCodeUnexpectedErrorResponse = 3,
  562. //
  563. // /** @var FIRAuthInternalErrorCodeUnexpectedResponse
  564. // @brief Indicates the HTTP response indicated the request was a successes, but the response
  565. // contains something other than a JSON-encoded dictionary, or the data type of the
  566. // response
  567. // indicated it is different from the type of response we expected.
  568. // @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary.
  569. // If this key is present in the dictionary, it may contain an error from
  570. // @c NSJSONSerialization error (indicating the response received was of the wrong data
  571. // type).
  572. //
  573. // See the @c FIRAuthErrorUserInfoDeserializedResponseKey value in the @c NSError.userInfo
  574. // dictionary. If the response could be deserialized, it's deserialized representation
  575. // will
  576. // be associated with this key. If the @c NSUnderlyingError value in the @c
  577. // NSError.userInfo
  578. // dictionary is @c nil, this indicates the JSON didn't represent a dictionary.
  579. // */
  580. // FIRAuthInternalErrorCodeUnexpectedResponse = 4,
  581. //
  582. // /** @var FIRAuthInternalErrorCodeRPCResponseDecodingError
  583. // @brief Indicates an error decoding the RPC response.
  584. // This is typically due to some sort of unexpected response value from the server.
  585. // @remarks See the @c NSUnderlyingError value in the @c NSError.userInfo dictionary for
  586. // details.
  587. //
  588. // See the @c FIRErrorUserInfoDecodedResponseKey value in the @c NSError.userInfo
  589. // dictionary.
  590. // The deserialized representation of the response will be associated with this key.
  591. // */
  592. // FIRAuthInternalErrorCodeRPCResponseDecodingError = 5,
  593. // };
  594. //
  595. // */