Skip to content

Add missing comments #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
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
13 changes: 13 additions & 0 deletions Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ - (void)verifyClientWithCompletion:(FIRVerifyClientCallback)completion {
}];
}

/** @fn reCAPTCHAURLWithEventID:completion:
@brief Constructs a URL used for opening a reCAPTCHA app verification flow using a given event
ID.
@param eventID The event ID used for this purpose.
@param completion The callback invoked after the URL has been constructed or an error
has been encountered.
*/
- (void)reCAPTCHAURLWithEventID:(NSString *)eventID completion:(FIRReCAPTCHAURLCallBack)completion {
[self fetchAuthDomainWithCompletion:^(NSString *_Nullable authDomain,
NSError *_Nullable error) {
Expand Down Expand Up @@ -457,6 +464,12 @@ - (void)reCAPTCHAURLWithEventID:(NSString *)eventID completion:(FIRReCAPTCHAURLC
}];
}


/** @fn fetchAuthDomainWithCompletion:completion:
@brief Fetches the auth domain associated with the Firebase Project.
@param completion The callback invoked after the auth domain has been constructed or an error
has been encountered.
*/
- (void)fetchAuthDomainWithCompletion:(FIRFetchAuthDomainCallback)completion {
FIRGetProjectConfigRequest *request =
[[FIRGetProjectConfigRequest alloc] initWithRequestConfiguration:_auth.requestConfiguration];
Expand Down
5 changes: 5 additions & 0 deletions Firebase/Auth/Source/FIRAuthDefaultUIDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

NS_ASSUME_NONNULL_BEGIN

/** @class FIRAuthDefaultUIDelegate
@brief Class responsible for providing a default FIRAuthUIDelegte.
@remarks This class should be used in the case that a UIDelegate was expected and necessary to
continue a given flow, but none was provided.
*/
@interface FIRAuthDefaultUIDelegate : NSObject <FIRAuthUIDelegate>

/** @fn defaultUIDelegate
Expand Down
3 changes: 3 additions & 0 deletions Firebase/Auth/Source/FIRAuthURLPresenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ typedef void (^FIRAuthURLPresentationCompletion)(NSURL *_Nullable callbackURL,
*/
typedef BOOL (^FIRAuthURLCallbackMatcher)(NSURL * _Nullable callbackURL);

/** @class FIRAuthURLPresenter
@brief A Class responsible for presenting URL via SFSafariViewController or UIWebView.
*/
@interface FIRAuthURLPresenter : NSObject

/** @fn presentURL:UIDelegate:callbackMatcher:completion:
Expand Down
3 changes: 2 additions & 1 deletion Firebase/Auth/Source/FIRAuthURLPresenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

NS_ASSUME_NONNULL_BEGIN

@interface FIRAuthURLPresenter () <SFSafariViewControllerDelegate, FIRAuthWebViewDelegate>
@interface FIRAuthURLPresenter () <SFSafariViewControllerDelegate,
FIRAuthWebViewControllerDelegate>
@end

@implementation FIRAuthURLPresenter {
Expand Down
3 changes: 3 additions & 0 deletions Firebase/Auth/Source/FIRAuthWebView.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

NS_ASSUME_NONNULL_BEGIN

/** @class FIRAuthWebView
@brief A class reponsible for creating a UIWebview for use within Firebase Auth.
*/
@interface FIRAuthWebView : UIView

/** @property webView
Expand Down
10 changes: 8 additions & 2 deletions Firebase/Auth/Source/FIRAuthWebViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@

NS_ASSUME_NONNULL_BEGIN

@protocol FIRAuthWebViewDelegate <NSObject>
/** @protocol FIRAuthWebViewControllerDelegate
@brief Defines a delegate for FIRAuthWebViewController
*/
@protocol FIRAuthWebViewControllerDelegate <NSObject>

/** @fn webViewController:canHandleURL:
@brief Determines if a URL should be handled by the delegate.
Expand All @@ -45,6 +48,9 @@ NS_ASSUME_NONNULL_BEGIN

@end

/** @class FIRAuthWebViewController
@brief Reponsible for creating a UIViewController for presenting a FIRAutWebView.
*/
@interface FIRAuthWebViewController : UIViewController

/** @fn initWithNibName:bundle:
Expand All @@ -59,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;

- (instancetype)initWithURL:(NSURL *)URL
delegate:(__weak id<FIRAuthWebViewDelegate>)delegate
delegate:(__weak id<FIRAuthWebViewControllerDelegate>)delegate
NS_DESIGNATED_INITIALIZER;

@end
Expand Down
4 changes: 2 additions & 2 deletions Firebase/Auth/Source/FIRAuthWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ @implementation FIRAuthWebViewController {
/** @var _delegate
@brief The delegate to call.
*/
__weak id<FIRAuthWebViewDelegate> _delegate;
__weak id<FIRAuthWebViewControllerDelegate> _delegate;

/** @var _webView;
@brief The web view instance for easier access.
Expand All @@ -41,7 +41,7 @@ @implementation FIRAuthWebViewController {
}

- (instancetype)initWithURL:(NSURL *)URL
delegate:(__weak id<FIRAuthWebViewDelegate>)delegate {
delegate:(__weak id<FIRAuthWebViewControllerDelegate>)delegate {
self = [super initWithNibName:nil bundle:nil];
if (self) {
_URL = URL;
Expand Down
3 changes: 1 addition & 2 deletions Firebase/Auth/Source/Public/FIRAuthUIDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ NS_ASSUME_NONNULL_BEGIN

/** @protocol FIRAuthUIDelegate
@brief A protocol to handle user interface interactions for Firebase Auth.
*/

*/
@protocol FIRAuthUIDelegate <NSObject>

/** @fn presentViewController:animated:completion:
Expand Down