FIRMultiFactorResolver.h 1.9 KB

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