FIREmailLinkSignInResponse.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #import "FirebaseAuth/Sources/Backend/FIRAuthRPCResponse.h"
  18. #import "FirebaseAuth/Sources/Backend/RPC/Proto/FIRAuthProtoMFAEnrollment.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @class FIRVerifyAssertionResponse
  21. @brief Represents the response from the emailLinkSignin endpoint.
  22. */
  23. @interface FIREmailLinkSignInResponse : NSObject <FIRAuthRPCResponse>
  24. /** @property IDToken
  25. @brief The ID token in the email link sign-in response.
  26. */
  27. @property(nonatomic, copy, readonly) NSString *IDToken;
  28. /** @property email
  29. @brief The email returned by the IdP.
  30. */
  31. @property(nonatomic, strong, readonly, nullable) NSString *email;
  32. /** @property refreshToken
  33. @brief The refreshToken returned by the server.
  34. */
  35. @property(nonatomic, strong, readonly, nullable) NSString *refreshToken;
  36. /** @property localID
  37. @brief The Firebase Auth user ID.
  38. */
  39. @property(nonatomic, strong, readonly, nullable) NSString *localID;
  40. /** @property approximateExpirationDate
  41. @brief The approximate expiration date of the access token.
  42. */
  43. @property(nonatomic, copy, readonly, nullable) NSDate *approximateExpirationDate;
  44. /** @property isNewUser
  45. @brief Flag indicating that the user signing in is a new user and not a returning user.
  46. */
  47. @property(nonatomic, assign) BOOL isNewUser;
  48. /** @property MFAPendingCredential
  49. @brief An opaque string that functions as proof that the user has successfully passed the first
  50. factor check.
  51. */
  52. @property(nonatomic, strong, readonly, nullable) NSString *MFAPendingCredential;
  53. /** @property MFAInfo
  54. @brief Info on which multi-factor authentication providers are enabled.
  55. */
  56. @property(nonatomic, strong, readonly, nullable) NSArray<FIRAuthProtoMFAEnrollment *> *MFAInfo;
  57. @end
  58. NS_ASSUME_NONNULL_END