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.

569 lines
24 KiB

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. @class FIRAuthRequestConfiguration;
  18. @class FIRCreateAuthURIRequest;
  19. @class FIRCreateAuthURIResponse;
  20. @class FIREmailLinkSignInRequest;
  21. @class FIREmailLinkSignInResponse;
  22. @class FIRGetAccountInfoRequest;
  23. @class FIRGetAccountInfoResponse;
  24. @class FIRGetProjectConfigRequest;
  25. @class FIRGetProjectConfigResponse;
  26. @class FIRGetOOBConfirmationCodeRequest;
  27. @class FIRGetOOBConfirmationCodeResponse;
  28. @class FIRResetPasswordRequest;
  29. @class FIRResetPasswordResponse;
  30. @class FIRSecureTokenRequest;
  31. @class FIRSecureTokenResponse;
  32. @class FIRSetAccountInfoRequest;
  33. @class FIRSetAccountInfoResponse;
  34. @class FIRVerifyAssertionRequest;
  35. @class FIRVerifyAssertionResponse;
  36. @class FIRVerifyClientRequest;
  37. @class FIRVerifyClientResponse;
  38. @class FIRVerifyCustomTokenRequest;
  39. @class FIRVerifyCustomTokenResponse;
  40. @class FIRVerifyPasswordRequest;
  41. @class FIRVerifyPasswordResponse;
  42. @class FIRVerifyPhoneNumberRequest;
  43. @class FIRVerifyPhoneNumberResponse;
  44. @class FIRSendVerificationCodeRequest;
  45. @class FIRSendVerificationCodeResponse;
  46. @class FIRSignUpNewUserRequest;
  47. @class FIRSignUpNewUserResponse;
  48. @class FIRDeleteAccountRequest;
  49. @class FIRDeleteAccountResponse;
  50. @protocol FIRAuthBackendImplementation;
  51. @protocol FIRAuthBackendRPCIssuer;
  52. NS_ASSUME_NONNULL_BEGIN
  53. /** @typedef FIRAuthBackendRPCIssuerCompletionHandler
  54. @brief The type of block used to return the result of a call to an endpoint.
  55. @param data The HTTP response body.
  56. @param error The error which occurred, if any.
  57. @remarks One of response or error will be non-nil.
  58. */
  59. typedef void (^FIRAuthBackendRPCIssuerCompletionHandler)(NSData *_Nullable data,
  60. NSError *_Nullable error);
  61. /** @typedef FIRCreateAuthURIResponseCallback
  62. @brief The type of block used to return the result of a call to the createAuthURI
  63. endpoint.
  64. @param response The received response, if any.
  65. @param error The error which occurred, if any.
  66. @remarks One of response or error will be non-nil.
  67. */
  68. typedef void (^FIRCreateAuthURIResponseCallback)
  69. (FIRCreateAuthURIResponse *_Nullable response, NSError *_Nullable error);
  70. /** @typedef FIRGetAccountInfoResponseCallback
  71. @brief The type of block used to return the result of a call to the getAccountInfo
  72. endpoint.
  73. @param response The received response, if any.
  74. @param error The error which occurred, if any.
  75. @remarks One of response or error will be non-nil.
  76. */
  77. typedef void (^FIRGetAccountInfoResponseCallback)
  78. (FIRGetAccountInfoResponse *_Nullable response, NSError *_Nullable error);
  79. /** @typedef FIRGetProjectConfigResponseCallback
  80. @brief The type of block used to return the result of a call to the getProjectInfo
  81. endpoint.
  82. @param response The received response, if any.
  83. @param error The error which occurred, if any.
  84. @remarks One of response or error will be non-nil.
  85. */
  86. typedef void (^FIRGetProjectConfigResponseCallback)
  87. (FIRGetProjectConfigResponse *_Nullable response, NSError *_Nullable error);
  88. /** @typedef FIRSetAccountInfoResponseCallback
  89. @brief The type of block used to return the result of a call to the setAccountInfo
  90. endpoint.
  91. @param response The received response, if any.
  92. @param error The error which occurred, if any.
  93. @remarks One of response or error will be non-nil.
  94. */
  95. typedef void (^FIRSetAccountInfoResponseCallback)
  96. (FIRSetAccountInfoResponse *_Nullable response, NSError *_Nullable error);
  97. /** @typedef FIRSecureTokenResponseCallback
  98. @brief The type of block used to return the result of a call to the token endpoint.
  99. @param response The received response, if any.
  100. @param error The error which occurred, if any.
  101. @remarks One of response or error will be non-nil.
  102. */
  103. typedef void (^FIRSecureTokenResponseCallback)
  104. (FIRSecureTokenResponse *_Nullable response, NSError *_Nullable error);
  105. /** @typedef FIRVerifyAssertionResponseCallback
  106. @brief The type of block used to return the result of a call to the verifyAssertion
  107. endpoint.
  108. @param response The received response, if any.
  109. @param error The error which occurred, if any.
  110. @remarks One of response or error will be non-nil.
  111. */
  112. typedef void (^FIRVerifyAssertionResponseCallback)
  113. (FIRVerifyAssertionResponse *_Nullable response, NSError *_Nullable error);
  114. /** @typedef FIRVerifyPasswordResponseCallback
  115. @brief The type of block used to return the result of a call to the verifyPassword
  116. endpoint.
  117. @param response The received response, if any.
  118. @param error The error which occurred, if any.
  119. @remarks One of response or error will be non-nil.
  120. */
  121. typedef void (^FIRVerifyPasswordResponseCallback)
  122. (FIRVerifyPasswordResponse *_Nullable response, NSError *_Nullable error);
  123. /** @typedef FIREmailLinkSigninResponseCallback
  124. @brief The type of block used to return the result of a call to the emailLinkSignin
  125. endpoint.
  126. @param response The received response, if any.
  127. @param error The error which occurred, if any.
  128. @remarks One of response or error will be non-nil.
  129. */
  130. typedef void (^FIREmailLinkSigninResponseCallback)
  131. (FIREmailLinkSignInResponse *_Nullable response, NSError *_Nullable error);
  132. /** @typedef FIRVerifyCustomTokenResponseCallback
  133. @brief The type of block used to return the result of a call to the verifyCustomToken
  134. endpoint.
  135. @param response The received response, if any.
  136. @param error The error which occurred, if any.
  137. @remarks One of response or error will be non-nil.
  138. */
  139. typedef void (^FIRVerifyCustomTokenResponseCallback)
  140. (FIRVerifyCustomTokenResponse *_Nullable response, NSError *_Nullable error);
  141. /** @typedef FIRDeleteCallBack
  142. @brief The type of block called when a request delete account has finished.
  143. @param error The error which occurred, or nil if the request was successful.
  144. */
  145. typedef void (^FIRDeleteCallBack)(NSError *_Nullable error);
  146. /** @typedef FIRGetOOBConfirmationCodeResponseCallback
  147. @brief The type of block used to return the result of a call to the getOOBConfirmationCode
  148. endpoint.
  149. @param response The received response, if any.
  150. @param error The error which occurred, if any.
  151. @remarks One of response or error will be non-nil.
  152. */
  153. typedef void (^FIRGetOOBConfirmationCodeResponseCallback)
  154. (FIRGetOOBConfirmationCodeResponse *_Nullable response, NSError *_Nullable error);
  155. /** @typedef FIRSignupNewUserCallback
  156. @brief The type of block used to return the result of a call to the signupNewUser endpoint.
  157. @param response The received response, if any.
  158. @param error The error which occurred, if any.
  159. @remarks One of response or error will be non-nil.
  160. */
  161. typedef void (^FIRSignupNewUserCallback)
  162. (FIRSignUpNewUserResponse *_Nullable response, NSError *_Nullable error);
  163. /** @typedef FIRResetPasswordCallback
  164. @brief The type of block used to return the result of a call to the resetPassword endpoint.
  165. @param response The received response, if any.
  166. @param error The error which occurred, if any.
  167. @remarks One of response or error will be non-nil.
  168. */
  169. typedef void (^FIRResetPasswordCallback)
  170. (FIRResetPasswordResponse *_Nullable response, NSError *_Nullable error);
  171. /** @typedef FIRSendVerificationCodeResponseCallback
  172. @brief The type of block used to return the result of a call to the sendVerificationCode
  173. endpoint.
  174. @param response The received response, if any.
  175. @param error The error which occurred, if any.
  176. @remarks One of response or error will be non-nil.
  177. */
  178. typedef void (^FIRSendVerificationCodeResponseCallback)
  179. (FIRSendVerificationCodeResponse *_Nullable response, NSError *_Nullable error);
  180. /** @typedef FIRVerifyPhoneNumberResponseCallback
  181. @brief The type of block used to return the result of a call to the verifyPhoneNumber endpoint.
  182. @param response The received response, if any.
  183. @param error The error which occurred, if any.
  184. @remarks One of response or error will be non-nil.
  185. */
  186. typedef void (^FIRVerifyPhoneNumberResponseCallback)
  187. (FIRVerifyPhoneNumberResponse *_Nullable response, NSError *_Nullable error);
  188. /** @typedef FIRVerifyClientResponseCallback
  189. @brief The type of block used to return the result of a call to the verifyClient endpoint.
  190. @param response The received response, if any.
  191. @param error The error which occurred, if any.
  192. @remarks One of response or error will be non-nil.
  193. */
  194. typedef void (^FIRVerifyClientResponseCallback)
  195. (FIRVerifyClientResponse *_Nullable response, NSError *_Nullable error);
  196. /** @class FIRAuthBackend
  197. @brief Simple static class with methods representing the backend RPCs.
  198. @remarks All callback blocks passed as method parameters are invoked asynchronously on the
  199. global work queue in the future. See
  200. https://github.com/firebase/firebase-ios-sdk/tree/master/Firebase/Auth/Docs/threading.ml
  201. */
  202. @interface FIRAuthBackend : NSObject
  203. /** @fn authUserAgent
  204. @brief Retrieves the Firebase Auth user agent.
  205. @return The Firebase Auth user agent.
  206. */
  207. + (NSString *)authUserAgent;
  208. /** @fn setBackendImplementation:
  209. @brief Changes the default backend implementation to something else.
  210. @param backendImplementation The backend implementation to use.
  211. @remarks This is not, generally, safe to call in a scenario where other backend requests may
  212. be occuring. This is specifically to help mock the backend for testing purposes.
  213. */
  214. + (void)setBackendImplementation:(id<FIRAuthBackendImplementation>)backendImplementation;
  215. /** @fn setDefaultBackendImplementationWithRPCIssuer:
  216. @brief Uses the default backend implementation, but with a custom RPC issuer.
  217. @param RPCIssuer The RPC issuer to use. If @c nil, will use the default implementation.
  218. @remarks This is not, generally, safe to call in a scenario where other backend requests may
  219. be occuring. This is specifically to help test the backend interfaces (requests, responses,
  220. and shared FIRAuthBackend logic.)
  221. */
  222. + (void)setDefaultBackendImplementationWithRPCIssuer:
  223. (nullable id<FIRAuthBackendRPCIssuer>)RPCIssuer;
  224. /** @fn createAuthURI:callback:
  225. @brief Calls the createAuthURI endpoint, which is responsible for creating the URI used by the
  226. IdP to authenticate the user.
  227. @param request The request parameters.
  228. @param callback The callback.
  229. */
  230. + (void)createAuthURI:(FIRCreateAuthURIRequest *)request
  231. callback:(FIRCreateAuthURIResponseCallback)callback;
  232. /** @fn getAccountInfo:callback:
  233. @brief Calls the getAccountInfo endpoint, which returns account info for a given account.
  234. @param request The request parameters.
  235. @param callback The callback.
  236. */
  237. + (void)getAccountInfo:(FIRGetAccountInfoRequest *)request
  238. callback:(FIRGetAccountInfoResponseCallback)callback;
  239. /** @fn getProjectConfig:callback:
  240. @brief Calls the getProjectConfig endpoint, which returns configuration information for a given
  241. project.
  242. @param request An object wrapping the backend get request.
  243. @param callback The callback.
  244. */
  245. + (void)getProjectConfig:(FIRGetProjectConfigRequest *)request
  246. callback:(FIRGetProjectConfigResponseCallback)callback;
  247. /** @fn setAccountInfo:callback:
  248. @brief Calls the setAccountInfo endpoint, which is responsible for setting account info for a
  249. user, for example, to sign up a new user with email and password.
  250. @param request The request parameters.
  251. @param callback The callback.
  252. */
  253. + (void)setAccountInfo:(FIRSetAccountInfoRequest *)request
  254. callback:(FIRSetAccountInfoResponseCallback)callback;
  255. /** @fn verifyAssertion:callback:
  256. @brief Calls the verifyAssertion endpoint, which is responsible for authenticating a
  257. user who has IDP-related credentials (an ID Token, an Access Token, etc.)
  258. @param request The request parameters.
  259. @param callback The callback.
  260. */
  261. + (void)verifyAssertion:(FIRVerifyAssertionRequest *)request
  262. callback:(FIRVerifyAssertionResponseCallback)callback;
  263. /** @fn verifyCustomToken:callback:
  264. @brief Calls the verifyCustomToken endpoint, which is responsible for authenticating a
  265. user who has BYOAuth credentials (a self-signed token using their BYOAuth private key.)
  266. @param request The request parameters.
  267. @param callback The callback.
  268. */
  269. + (void)verifyCustomToken:(FIRVerifyCustomTokenRequest *)request
  270. callback:(FIRVerifyCustomTokenResponseCallback)callback;
  271. /** @fn verifyPassword:callback:
  272. @brief Calls the verifyPassword endpoint, which is responsible for authenticating a
  273. user who has email and password credentials.
  274. @param request The request parameters.
  275. @param callback The callback.
  276. */
  277. + (void)verifyPassword:(FIRVerifyPasswordRequest *)request
  278. callback:(FIRVerifyPasswordResponseCallback)callback;
  279. /** @fn emailLinkSignin:callback:
  280. @brief Calls the emailLinkSignin endpoint, which is responsible for authenticating a
  281. user through passwordless sign-in.
  282. @param request The request parameters.
  283. @param callback The callback.
  284. */
  285. + (void)emailLinkSignin:(FIREmailLinkSignInRequest *)request
  286. callback:(FIREmailLinkSigninResponseCallback)callback;
  287. /** @fn secureToken:callback:
  288. @brief Calls the token endpoint, which is responsible for performing STS token exchanges and
  289. token refreshes.
  290. @param request The request parameters.
  291. @param callback The callback.
  292. */
  293. + (void)secureToken:(FIRSecureTokenRequest *)request
  294. callback:(FIRSecureTokenResponseCallback)callback;
  295. /** @fn getOOBConfirmationCode:callback:
  296. @brief Calls the getOOBConfirmationCode endpoint, which is responsible for sending email change
  297. request emails, and password reset emails.
  298. @param request The request parameters.
  299. @param callback The callback.
  300. */
  301. + (void)getOOBConfirmationCode:(FIRGetOOBConfirmationCodeRequest *)request
  302. callback:(FIRGetOOBConfirmationCodeResponseCallback)callback;
  303. /** @fn signUpNewUser:
  304. @brief Calls the signUpNewUser endpoint, which is responsible anonymously signing up a user
  305. or signing in a user anonymously.
  306. @param request The request parameters.
  307. @param callback The callback.
  308. */
  309. + (void)signUpNewUser:(FIRSignUpNewUserRequest *)request
  310. callback:(FIRSignupNewUserCallback)callback;
  311. /** @fn resetPassword:callback
  312. @brief Calls the resetPassword endpoint, which is responsible for resetting a user's password
  313. given an OOB code and new password.
  314. @param request The request parameters.
  315. @param callback The callback.
  316. */
  317. + (void)resetPassword:(FIRResetPasswordRequest *)request
  318. callback:(FIRResetPasswordCallback)callback;
  319. /** @fn deleteAccount:
  320. @brief Calls the DeleteAccount endpoint, which is responsible for deleting a user.
  321. @param request The request parameters.
  322. @param callback The callback.
  323. */
  324. + (void)deleteAccount:(FIRDeleteAccountRequest *)request
  325. callback:(FIRDeleteCallBack)callback;
  326. #if TARGET_OS_IOS
  327. /** @fn sendVerificationCode:callback:
  328. @brief Calls the sendVerificationCode endpoint, which is responsible for sending the
  329. verification code to a phone number specified in the request parameters.
  330. @param request The request parameters.
  331. @param callback The callback.
  332. */
  333. + (void)sendVerificationCode:(FIRSendVerificationCodeRequest *)request
  334. callback:(FIRSendVerificationCodeResponseCallback)callback;
  335. /** @fn verifyPhoneNumber:callback:
  336. @brief Calls the verifyPhoneNumber endpoint, which is responsible for sending the verification
  337. code to a phone number specified in the request parameters.
  338. @param request The request parameters.
  339. @param callback The callback.
  340. */
  341. + (void)verifyPhoneNumber:(FIRVerifyPhoneNumberRequest *)request
  342. callback:(FIRVerifyPhoneNumberResponseCallback)callback;
  343. /** @fn verifyClient:callback:
  344. @brief Calls the verifyClient endpoint, which is responsible for sending the silent push
  345. notification used for app validation to the device provided in the request parameters.
  346. @param request The request parameters.
  347. @param callback The callback.
  348. */
  349. + (void)verifyClient:(FIRVerifyClientRequest *)request
  350. callback:(FIRVerifyClientResponseCallback)callback;
  351. #endif
  352. @end
  353. /** @protocol FIRAuthBackendRPCIssuer
  354. @brief Used to make FIRAuthBackend
  355. */
  356. @protocol FIRAuthBackendRPCIssuer <NSObject>
  357. /** @fn asyncPostToURLWithRequestConfiguration:URL:body:contentType:completionHandler:
  358. @brief Asynchronously seXnds a POST request.
  359. @param requestConfiguration The request to be made.
  360. @param URL The request URL.
  361. @param body Request body.
  362. @param contentType Content type of the body.
  363. @param handler provided that handles POST response. Invoked asynchronously on the auth global
  364. work queue in the future.
  365. */
  366. - (void)asyncPostToURLWithRequestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  367. URL:(NSURL *)URL
  368. body:(NSData *)body
  369. contentType:(NSString *)contentType
  370. completionHandler:(FIRAuthBackendRPCIssuerCompletionHandler)handler;
  371. @end
  372. /** @protocol FIRAuthBackendImplementation
  373. @brief Used to make FIRAuthBackend provide a layer of indirection to an actual RPC-based backend
  374. or a mock backend.
  375. */
  376. @protocol FIRAuthBackendImplementation <NSObject>
  377. /** @fn createAuthURI:callback:
  378. @brief Calls the createAuthURI endpoint, which is responsible for creating the URI used by the
  379. IdP to authenticate the user.
  380. @param request The request parameters.
  381. @param callback The callback.
  382. */
  383. - (void)createAuthURI:(FIRCreateAuthURIRequest *)request
  384. callback:(FIRCreateAuthURIResponseCallback)callback;
  385. /** @fn getAccountInfo:callback:
  386. @brief Calls the getAccountInfo endpoint, which returns account info for a given account.
  387. @param request The request parameters.
  388. @param callback The callback.
  389. */
  390. - (void)getAccountInfo:(FIRGetAccountInfoRequest *)request
  391. callback:(FIRGetAccountInfoResponseCallback)callback;
  392. /** @fn getProjectConfig:callback:
  393. @brief Calls the getProjectInfo endpoint, which returns configuration information for a given
  394. project.
  395. @param request The request parameters.
  396. @param callback The callback.
  397. */
  398. - (void)getProjectConfig:(FIRGetProjectConfigRequest *)request
  399. callback:(FIRGetProjectConfigResponseCallback)callback;
  400. /** @fn setAccountInfo:callback:
  401. @brief Calls the setAccountInfo endpoint, which is responsible for setting account info for a
  402. user, for example, to sign up a new user with email and password.
  403. @param request The request parameters.
  404. @param callback The callback.
  405. */
  406. - (void)setAccountInfo:(FIRSetAccountInfoRequest *)request
  407. callback:(FIRSetAccountInfoResponseCallback)callback;
  408. /** @fn verifyAssertion:callback:
  409. @brief Calls the verifyAssertion endpoint, which is responsible for authenticating a
  410. user who has IDP-related credentials (an ID Token, an Access Token, etc.)
  411. @param request The request parameters.
  412. @param callback The callback.
  413. */
  414. - (void)verifyAssertion:(FIRVerifyAssertionRequest *)request
  415. callback:(FIRVerifyAssertionResponseCallback)callback;
  416. /** @fn verifyCustomToken:callback:
  417. @brief Calls the verifyCustomToken endpoint, which is responsible for authenticating a
  418. user who has BYOAuth credentials (a self-signed token using their BYOAuth private key.)
  419. @param request The request parameters.
  420. @param callback The callback.
  421. */
  422. - (void)verifyCustomToken:(FIRVerifyCustomTokenRequest *)request
  423. callback:(FIRVerifyCustomTokenResponseCallback)callback;
  424. /** @fn verifyPassword:callback:
  425. @brief Calls the verifyPassword endpoint, which is responsible for authenticating a
  426. user who has email and password credentials.
  427. @param request The request parameters.
  428. @param callback The callback.
  429. */
  430. - (void)verifyPassword:(FIRVerifyPasswordRequest *)request
  431. callback:(FIRVerifyPasswordResponseCallback)callback;
  432. /** @fn emailLinkSignin:callback:
  433. @brief Calls the emailLinkSignin endpoint, which is responsible for authenticating a
  434. user through passwordless sign-in.
  435. @param request The request parameters.
  436. @param callback The callback.
  437. */
  438. - (void)emailLinkSignin:(FIREmailLinkSignInRequest *)request
  439. callback:(FIREmailLinkSigninResponseCallback)callback;
  440. /** @fn secureToken:callback:
  441. @brief Calls the token endpoint, which is responsible for performing STS token exchanges and
  442. token refreshes.
  443. @param request The request parameters.
  444. @param callback The callback.
  445. */
  446. - (void)secureToken:(FIRSecureTokenRequest *)request
  447. callback:(FIRSecureTokenResponseCallback)callback;
  448. /** @fn getOOBConfirmationCode:callback:
  449. @brief Calls the getOOBConfirmationCode endpoint, which is responsible for sending email change
  450. request emails, email sign-in link emails, and password reset emails.
  451. @param request The request parameters.
  452. @param callback The callback.
  453. */
  454. - (void)getOOBConfirmationCode:(FIRGetOOBConfirmationCodeRequest *)request
  455. callback:(FIRGetOOBConfirmationCodeResponseCallback)callback;
  456. /** @fn signUpNewUser:
  457. @brief Calls the signUpNewUser endpoint, which is responsible anonymously signing up a user
  458. or signing in a user anonymously.
  459. @param request The request parameters.
  460. @param callback The callback.
  461. */
  462. - (void)signUpNewUser:(FIRSignUpNewUserRequest *)request
  463. callback:(FIRSignupNewUserCallback)callback;
  464. /** @fn deleteAccount:
  465. @brief Calls the DeleteAccount endpoint, which is responsible for deleting a user.
  466. @param request The request parameters.
  467. @param callback The callback.
  468. */
  469. - (void)deleteAccount:(FIRDeleteAccountRequest *)request
  470. callback:(FIRDeleteCallBack)callback;
  471. #if TARGET_OS_IOS
  472. /** @fn sendVerificationCode:callback:
  473. @brief Calls the sendVerificationCode endpoint, which is responsible for sending the
  474. verification code to a phone number specified in the request parameters.
  475. @param request The request parameters.
  476. @param callback The callback.
  477. */
  478. - (void)sendVerificationCode:(FIRSendVerificationCodeRequest *)request
  479. callback:(FIRSendVerificationCodeResponseCallback)callback;
  480. /** @fn verifyPhoneNumber:callback:
  481. @brief Calls the verifyPhoneNumber endpoint, which is responsible for sending the verification
  482. code to a phone number specified in the request parameters.
  483. @param request The request parameters.
  484. @param callback The callback.
  485. */
  486. - (void)verifyPhoneNumber:(FIRVerifyPhoneNumberRequest *)request
  487. callback:(FIRVerifyPhoneNumberResponseCallback)callback;
  488. /** @fn verifyClient:callback:
  489. @brief Calls the verifyClient endpoint, which is responsible for sending the silent push
  490. notification used for app validation to the device provided in the request parameters.
  491. @param request The request parameters.
  492. @param callback The callback.
  493. */
  494. - (void)verifyClient:(FIRVerifyClientRequest *)request
  495. callback:(FIRVerifyClientResponseCallback)callback;
  496. #endif
  497. /** @fn resetPassword:callback
  498. @brief Calls the resetPassword endpoint, which is responsible for resetting a user's password
  499. given an OOB code and new password.
  500. @param request The request parameters.
  501. @param callback The callback.
  502. */
  503. - (void)resetPassword:(FIRResetPasswordRequest *)request
  504. callback:(FIRResetPasswordCallback)callback;
  505. @end
  506. NS_ASSUME_NONNULL_END