Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions FirebaseAuthUI/FUIAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@
*/
static NSString *const kErrorUserInfoEmailKey = @"FIRAuthErrorUserInfoEmailKey";

/** @var kFirebaseAuthUIFrameworkMarker
@brief The marker in the HTTP header that indicates the presence of Firebase Auth UI.
*/
static NSString *const kFirebaseAuthUIFrameworkMarker = @"FirebaseUI-iOS";

/** @category FIRAuth(InternalInterface)
@brief Redeclares the internal interface not publicly exposed in FIRAuth.
*/
@interface FIRAuth (InternalInterface)
Copy link
Contributor

@morganchen12 morganchen12 Sep 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put this in the @interface FUIAuth () declaration down below?

edit: ah, I see they're different classes


/** @property additionalFrameworkMarker
@brief Additional framework marker that will be added as part of the header of every request.
*/
@property(nonatomic, copy, nullable) NSString *additionalFrameworkMarker;

@end

@interface FUIAuth ()

/** @fn initWithAuth:
Expand Down Expand Up @@ -72,6 +89,9 @@ + (nullable FUIAuth *)authUIWithAuth:(FIRAuth *)auth {
authUI = [[FUIAuth alloc] initWithAuth:auth];
objc_setAssociatedObject(auth, &kAuthAssociationKey, authUI,
OBJC_ASSOCIATION_RETAIN_NONATOMIC);
if ([auth respondsToSelector:@selector(setAdditionalFrameworkMarker:)]) {
auth.additionalFrameworkMarker = kFirebaseAuthUIFrameworkMarker;
}
}
return authUI;
}
Expand Down