Skip to content

Commit 7bc31b6

Browse files
committed
Logs the presence of Firebase Auth UI in Auth server requests.
1 parent 51ae68f commit 7bc31b6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

FirebaseAuthUI/FUIAuth.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,23 @@
4444
*/
4545
static NSString *const kErrorUserInfoEmailKey = @"FIRAuthErrorUserInfoEmailKey";
4646

47+
/** @var kFirebaseAuthUIFrameworkMarker
48+
@brief The marker in the HTTP header that indicates the presence of Firebase Auth UI.
49+
*/
50+
static NSString *const kFirebaseAuthUIFrameworkMarker = @"FirebaseUI-iOS";
51+
52+
/** @category FIRAuth(InternalInterface)
53+
@brief Reclares the internal interface not publicly exposed in FIRAuth.
54+
*/
55+
@interface FIRAuth (InternalInterface)
56+
57+
/** @property additionalFrameworkMarker
58+
@brief Additional framework marker that will be added as part of the header of every request.
59+
*/
60+
@property(nonatomic, copy, nullable) NSString *additionalFrameworkMarker;
61+
62+
@end
63+
4764
@interface FUIAuth ()
4865

4966
/** @fn initWithAuth:
@@ -72,6 +89,7 @@ + (nullable FUIAuth *)authUIWithAuth:(FIRAuth *)auth {
7289
authUI = [[FUIAuth alloc] initWithAuth:auth];
7390
objc_setAssociatedObject(auth, &kAuthAssociationKey, authUI,
7491
OBJC_ASSOCIATION_RETAIN_NONATOMIC);
92+
auth.additionalFrameworkMarker = kFirebaseAuthUIFrameworkMarker;
7593
}
7694
return authUI;
7795
}

0 commit comments

Comments
 (0)