Skip to content

Commit

Permalink
Check if _appCheck is configured before using
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmathias committed Aug 16, 2023
1 parent 4d8aa26 commit df8b89b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion GoogleSignIn/Sources/GIDSignIn.m
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,9 @@ - (void)authorizationRequestWithOptions:(GIDSignInInternalOptions *)options comp
[self additionalParametersFromOptions:options];
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
if (@available(iOS 14.0, *)) {
if (_appCheck) {
// Only use `_appCheck` (created via singleton `+[GIDSignIn sharedInstance]` call) if
// `-[GIDAppCheck prepareForAppCheckWithCompletion:]` has been called
if ([_appCheck isPrepared]) {
shouldCallCompletion = NO;
UIViewController *presentingVC = options.presentingViewController;
if (!_timedLoader) {
Expand Down

0 comments on commit df8b89b

Please sign in to comment.