FIRMultiFactorResolver.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. #include <TargetConditionals.h>
  17. #if TARGET_OS_IOS
  18. #import "FIRMultiFactor.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @class FIRMultiFactorResolver
  21. @brief The data structure used to help developers resolve 2nd factor requirements on users that
  22. have opted in to 2 factor authentication.
  23. */
  24. NS_SWIFT_NAME(MultiFactorResolver)
  25. @interface FIRMultiFactorResolver : NSObject
  26. /**
  27. @brief The opaque session identifier for the current sign-in flow.
  28. */
  29. @property(nonatomic, readonly) FIRMultiFactorSession *session;
  30. /**
  31. @brief The list of hints for the second factors needed to complete the sign-in for the current
  32. session.
  33. */
  34. @property(nonatomic, readonly) NSArray<FIRMultiFactorInfo *> *hints NS_SWIFT_NAME(hints);
  35. /**
  36. @brief The Auth reference for the current FIRMultiResolver.
  37. */
  38. @property(nonatomic, readonly) FIRAuth *auth;
  39. /** @fn resolveSignInWithAssertion:completion:
  40. @brief A helper function to help users complete sign in with a second factor using an
  41. FIRMultiFactorAssertion confirming the user successfully completed the second factor
  42. challenge.
  43. @param completion The block invoked when the request is complete, or fails.
  44. */
  45. - (void)resolveSignInWithAssertion:(FIRMultiFactorAssertion *)assertion
  46. completion:(nullable FIRAuthDataResultCallback)completion;
  47. @end
  48. NS_ASSUME_NONNULL_END
  49. #endif