@@ -29,42 +29,43 @@ NS_ASSUME_NONNULL_BEGIN
2929@class GIDGoogleUser;
3030@class GIDSignInInternalOptions;
3131
32- // Represents a completion block that takes a `GIDUserAuth` on success or an error if the operation
33- // was unsuccessful.
32+ // / Represents a completion block that takes a `GIDUserAuth` on success or an error if the operation
33+ // / was unsuccessful.
3434typedef void (^GIDUserAuthCompletion)(GIDUserAuth *_Nullable userAuth, NSError *_Nullable error);
3535
3636// Private |GIDSignIn| methods that are used internally in this SDK and other Google SDKs.
3737@interface GIDSignIn ()
3838
39- // Redeclare |currentUser| as readwrite for internal use.
39+ // / Redeclare |currentUser| as readwrite for internal use.
4040@property (nonatomic , readwrite , nullable ) GIDGoogleUser *currentUser;
4141
42- // Private initializer for |GIDSignIn|.
42+ // / Private initializer for |GIDSignIn|.
4343- (instancetype )initPrivate ;
4444
45- // Authenticates with extra options.
45+ // / Authenticates with extra options.
4646- (void )signInWithOptions : (GIDSignInInternalOptions *)options ;
4747
48- // Restores a previously authenticated user from the keychain synchronously without refreshing
49- // the access token or making a userinfo request. The currentUser.profile will be nil unless
50- // the profile data can be extracted from the ID token.
51- //
52- // @return NO if there is no user restored from the keychain.
48+ // / Restores a previously authenticated user from the keychain synchronously without refreshing
49+ // / the access token or making a userinfo request.
50+ // /
51+ // / The currentUser.profile will be nil unless the profile data can be extracted from the ID token.
52+ // /
53+ // / @return NO if there is no user restored from the keychain.
5354- (BOOL )restorePreviousSignInNoRefresh ;
5455
5556#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
5657
57- // Starts an interactive consent flow on iOS to add scopes to the current user's grants.
58- //
59- // The completion will be called at the end of this process. If successful, a new `GIDGoogleUser `
60- // instance will be returned reflecting the new scopes and saved sign-in state will be updated.
61- //
62- // @param scopes The scopes to ask the user to consent to.
63- // @param presentingViewController The view controller used to present `SFSafariViewContoller` on
64- // iOS 9 and 10 and to supply `presentationContextProvider` for `ASWebAuthenticationSession` on
65- // iOS 13+.
66- // @param completion The block that is called on completion. This block will be called asynchronously
67- // on the main queue.
58+ // / Starts an interactive consent flow on iOS to add scopes to the current user's grants.
59+ // /
60+ // / The completion will be called at the end of this process. If successful, a `GIDUserAuth `
61+ // / instance will be returned reflecting the new scopes and saved sign-in state will be updated.
62+ // /
63+ // / @param scopes The scopes to ask the user to consent to.
64+ // / @param presentingViewController The view controller used to present `SFSafariViewContoller` on
65+ // / iOS 9 and 10 and to supply `presentationContextProvider` for `ASWebAuthenticationSession` on
66+ // / iOS 13+.
67+ // / @param completion The block that is called on completion. This block will be called asynchronously
68+ // / on the main queue.
6869- (void )addScopes : (NSArray <NSString *> *)scopes
6970 presentingViewController : (UIViewController *)presentingViewController
7071 completion : (nullable void (^)(GIDUserAuth *_Nullable userAuth,
@@ -73,19 +74,20 @@ typedef void (^GIDUserAuthCompletion)(GIDUserAuth *_Nullable userAuth, NSError *
7374
7475#elif TARGET_OS_OSX
7576
76- // Starts an interactive consent flow on macOS to add scopes to the current user's grants
77- //
78- // The completion will be called at the end of this process. If successful, a new `GIDGoogleUser`
79- // instance will be returned reflecting the new scopes and saved sign-in state will be updated.
80- //
81- // @param scopes An array of scopes to ask the user to consent to.
82- // @param presentingWindow The window used to supply `presentationContextProvider` for `ASWebAuthenticationSession`.
83- // @param completion The block that is called on completion. This block will be called asynchronously
84- // on the main queue.
77+ // / Starts an interactive consent flow on macOS to add scopes to the current user's grants.
78+ // /
79+ // / The completion will be called at the end of this process. If successful, a `GIDUserAuth`
80+ // / instance will be returned reflecting the new scopes and saved sign-in state will be updated.
81+ // /
82+ // / @param scopes An array of scopes to ask the user to consent to.
83+ // / @param presentingWindow The window used to supply `presentationContextProvider` for
84+ // / `ASWebAuthenticationSession`.
85+ // / @param completion The block that is called on completion. This block will be called asynchronously
86+ // / on the main queue.
8587- (void )addScopes : (NSArray <NSString *> *)scopes
8688 presentingWindow : (NSWindow *)presentingWindow
8789 completion : (nullable void (^)(GIDUserAuth *_Nullable userAuth,
88- NSError *_Nullable error))completion;
90+ NSError *_Nullable error))completion;
8991
9092#endif
9193
0 commit comments