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.

81 lines
2.6 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 FIRAuthCredential;
  18. NS_ASSUME_NONNULL_BEGIN
  19. /**
  20. @brief A string constant identifying the email & password identity provider.
  21. */
  22. extern NSString *const FIREmailAuthProviderID NS_SWIFT_NAME(EmailAuthProviderID);
  23. /**
  24. @brief A string constant identifying the email-link sign-in method.
  25. */
  26. extern NSString *const FIREmailLinkAuthSignInMethod NS_SWIFT_NAME(EmailLinkAuthSignInMethod);
  27. /**
  28. @brief A string constant identifying the email & password sign-in method.
  29. */
  30. extern NSString *const FIREmailPasswordAuthSignInMethod
  31. NS_SWIFT_NAME(EmailPasswordAuthSignInMethod);
  32. /**
  33. @brief Please use `FIREmailAuthProviderID` for Objective-C or `EmailAuthProviderID` for Swift instead.
  34. */
  35. extern NSString *const FIREmailPasswordAuthProviderID __attribute__((deprecated));
  36. /** @class FIREmailAuthProvider
  37. @brief A concrete implementation of `FIRAuthProvider` for Email & Password Sign In.
  38. */
  39. NS_SWIFT_NAME(EmailAuthProvider)
  40. @interface FIREmailAuthProvider : NSObject
  41. /** @typedef FIREmailPasswordAuthProvider
  42. @brief Please use `FIREmailAuthProvider` instead.
  43. */
  44. typedef FIREmailAuthProvider FIREmailPasswordAuthProvider __attribute__((deprecated));
  45. /** @fn credentialWithEmail:password:
  46. @brief Creates an `FIRAuthCredential` for an email & password sign in.
  47. @param email The user's email address.
  48. @param password The user's password.
  49. @return A FIRAuthCredential containing the email & password credential.
  50. */
  51. + (FIRAuthCredential *)credentialWithEmail:(NSString *)email password:(NSString *)password;
  52. /** @fn credentialWithEmail:Link:
  53. @brief Creates an `FIRAuthCredential` for an email & link sign in.
  54. @param email The user's email address.
  55. @param link The email sign-in link.
  56. @return A FIRAuthCredential containing the email & link credential.
  57. */
  58. + (FIRAuthCredential *)credentialWithEmail:(NSString *)email link:(NSString *)link;
  59. /** @fn init
  60. @brief This class is not meant to be initialized.
  61. */
  62. - (instancetype)init NS_UNAVAILABLE;
  63. @end
  64. NS_ASSUME_NONNULL_END