17
17
#import < Foundation/Foundation.h>
18
18
19
19
#import " FirebaseAuth/Sources/Backend/FIRAuthRPCRequest.h"
20
+ #import " FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h"
20
21
21
22
@protocol FIRHeartbeatLoggerProtocol;
22
23
@@ -37,6 +38,11 @@ NS_ASSUME_NONNULL_BEGIN
37
38
*/
38
39
@property (nonatomic , copy , readonly ) NSString *appID;
39
40
41
+ /* * @property auth
42
+ @brief The FIRAuth instance used in the request.
43
+ */
44
+ @property (nonatomic , weak , readonly , nullable ) FIRAuth *auth;
45
+
40
46
/* * @property heartbeatLogger
41
47
@brief The heartbeat logger used to add heartbeats to the corresponding request's header.
42
48
*/
@@ -66,14 +72,36 @@ NS_ASSUME_NONNULL_BEGIN
66
72
*/
67
73
- (nullable instancetype )initWithAPIKey : (NSString *)APIKey appID : (NSString *)appID ;
68
74
75
+ /* * @fn initWithAPIKey:appID:
76
+ @brief Convenience initializer.
77
+ @param APIKey The API key to be used in the request.
78
+ @param appID The Firebase app ID to be passed in the request header.
79
+ @param auth The FIRAuth instance used in the request.
80
+ */
81
+ - (nullable instancetype )initWithAPIKey : (NSString *)APIKey
82
+ appID : (NSString *)appID
83
+ auth : (nullable FIRAuth *)auth ;
84
+
69
85
/* * @fn initWithAPIKey:appID:heartbeatLogger:
70
86
@brief Designated initializer.
71
87
@param APIKey The API key to be used in the request.
72
- @param appID The Firebase app ID to be passed in the request header.
88
+ @param appID The Firebase app ID to be passed in the request header.
89
+ @param heartbeatLogger The heartbeat logger used to add heartbeats to the request header.
90
+ */
91
+ - (nullable instancetype )initWithAPIKey : (NSString *)APIKey
92
+ appID : (NSString *)appID
93
+ heartbeatLogger : (nullable id <FIRHeartbeatLoggerProtocol>)heartbeatLogger ;
94
+
95
+ /* * @fn initWithAPIKey:appID:heartbeatLogger:
96
+ @brief Designated initializer.
97
+ @param APIKey The API key to be used in the request.
98
+ @param appID The Firebase app ID to be passed in the request header.
99
+ @param auth The FIRAuth instance used in the request.
73
100
@param heartbeatLogger The heartbeat logger used to add heartbeats to the request header.
74
101
*/
75
102
- (nullable instancetype )initWithAPIKey : (NSString *)APIKey
76
103
appID : (NSString *)appID
104
+ auth : (nullable FIRAuth *)auth
77
105
heartbeatLogger : (nullable id <FIRHeartbeatLoggerProtocol>)heartbeatLogger
78
106
NS_DESIGNATED_INITIALIZER;
79
107
0 commit comments