瀏覽代碼

#471 Proper user has canceled login error code. (#472)

Romick2005 1 年之前
父節點
當前提交
4a17a8da24
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      GoogleSignIn/Sources/GIDSignIn.m

+ 2 - 1
GoogleSignIn/Sources/GIDSignIn.m

@@ -829,7 +829,8 @@ static NSString *const kConfigOpenIDRealmKey = @"GIDOpenIDRealm";
   } else {
     NSString *errorString = [error localizedDescription];
     GIDSignInErrorCode errorCode = kGIDSignInErrorCodeUnknown;
-    if (error.code == OIDErrorCodeUserCanceledAuthorizationFlow) {
+    if (error.code == OIDErrorCodeUserCanceledAuthorizationFlow ||
+        error.code == OIDErrorCodeProgramCanceledAuthorizationFlow) {
       // The user has canceled the flow at the iOS modal dialog.
       errorString = kUserCanceledError;
       errorCode = kGIDSignInErrorCodeCanceled;