FIRMultiFactor.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2019 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/LICENSE2.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 FIRMultiFactorSession;
  18. NS_ASSUME_NONNULL_BEGIN
  19. /** @typedef FIRMultiFactorSessionCallback
  20. @brief The callback that triggered when a developer calls `getSessionWithCompletion`.
  21. This type is available on iOS only.
  22. @param session The multi factor session returned, if any.
  23. @param error The error which occurred, if any.
  24. */
  25. typedef void (^FIRMultiFactorSessionCallback)(FIRMultiFactorSession *_Nullable session,
  26. NSError *_Nullable error)
  27. NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.")
  28. API_UNAVAILABLE(macos, tvos, watchos);
  29. /**
  30. @brief The string identifier for using phone as a second factor.
  31. This constant is available on iOS only.
  32. */
  33. extern NSString *const _Nonnull FIRPhoneMultiFactorID NS_SWIFT_NAME(PhoneMultiFactorID)
  34. API_UNAVAILABLE(macos, tvos, watchos);
  35. /**
  36. @brief The string identifier for using TOTP as a second factor.
  37. This constant is available on iOS only.
  38. */
  39. extern NSString *const _Nonnull FIRTOTPMultiFactorID NS_SWIFT_NAME(TOTPMultiFactorID)
  40. API_UNAVAILABLE(macos, tvos, watchos);
  41. NS_ASSUME_NONNULL_END