iOS:Google Sigin错误,您的应用已被阻止 [英] iOS : Google Sigin error, Your app is blocked

查看:91
本文介绍了iOS:Google Sigin错误,您的应用已被阻止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Google登录时,出现此错误

"此应用尝试访问您Google帐户中的敏感信息.为了确保您帐户的安全,Google阻止了此访问权限"

在下面提到我的代码的地方,我叫google登录

  #pragma标记-Google云端硬盘登录-(void)googlePlusLogin {GIDSignIn * signin = [GIDSignIn sharedInstance];signin.shouldFetchBasicProfile = true;signin.delegate =自我;signin.presentingViewController = self.window.rootViewController;//signin.uiDelegate = self;NSString * driveWrite = @" https://www.googleapis.com/auth/drive" ;;NSArray * currentScopes = [GIDSignIn sharedInstance] .scopes;//[GIDSignIn sharedInstance] .scopes = [currentScopes arrayByAddingObject:driveScope];[GIDSignIn sharedInstance] .scopes = [currentScopes arrayByAddingObject:driveWrite];[self performSelector:@selector(checkForLoginInGoogle)withObject:n after afterlay:0.1];}-(void)checkForLoginInGoogle {GIDSignIn * signin = [GIDSignIn sharedInstance];如果([signin hasPreviousSignIn]){[signin restorePreviousSignIn];}别的{[登录登录];}} 

解决方案

请转到

现在要解决此问题:

  1. 现在转到编辑应用"
  2. 转到应用程序域"部分
  3. 在应用程序主页",应用程序隐私策略链接"中提供信息.和应用程序服务条款链接".
  4. 现在添加授权域"-添加授权域后,您可以使用其任何子域或页面.如果您在创建凭据时添加了授权Java脚本起源"和授权重定向URI",它们也将显示在此处."
  5. 请按照此处的验证步骤进行操作: https://kinsta.com/blog/google-网站验证/

完成验证后,此问题将得到解决.

或者,您也可以在Google控制台中使用相同的BundleID创建一个新项目,并创建新凭据.通过使用此凭据,您将获得100位用户的新用户上限.

注意:替代解决方案仅是暂时的.永久解决方案是使用Google验证应用.

on time of sign-in from google, this error appears

"This app tried to access sensitive info in your Google account. To keep your account safe, google blocked this access"

my code is mention below where i called google SignIn

#pragma mark - Google Drive Login
-(void)googlePlusLogin{

    GIDSignIn *signin = [GIDSignIn sharedInstance];
    signin.shouldFetchBasicProfile = true;
    signin.delegate = self;
    signin.presentingViewController = self.window.rootViewController;
    //signin.uiDelegate = self;

    NSString *driveWrite = @"https://www.googleapis.com/auth/drive";
    NSArray *currentScopes = [GIDSignIn sharedInstance].scopes;
  //  [GIDSignIn sharedInstance].scopes = [currentScopes arrayByAddingObject:driveScope];
    [GIDSignIn sharedInstance].scopes = [currentScopes arrayByAddingObject:driveWrite];
    [self performSelector:@selector(checkForLoginInGoogle) withObject:nil afterDelay:0.1];
  
}

-(void)checkForLoginInGoogle{
    GIDSignIn *signin = [GIDSignIn sharedInstance];

    if ([signin hasPreviousSignIn]) {
        [signin restorePreviousSignIn];
    }
    else{
        [signin signIn];
    }   
}

解决方案

Please go to https://console.developers.google.com and login with your creds.

Now go to APIs & Services -> OAuth consent screen

Now confirm you have selected a correct project the issue is facing for

Check here your user cap limit. If this reached to the higher limit then you have to verify you product with google.

See here:

Now to resolve this:

  1. Now go to "Edit App"
  2. Go to "App domain" section
  3. Provide information in "Application home page", "Application privacy policy link" and "Application Terms of Service link".
  4. Now add "Authorised Domain" - "After you add an authorised domain, you can use any of its subdomains or pages. If you added Authorised Javascripts Origins and Authorised Redirect URIs when you created your credentials, they will also appear here."
  5. Follow verification steps form here: https://kinsta.com/blog/google-site-verification/

Once Verification done this issue will get resolved.

Alternatively, You can also create a new Project with same BundleID in the Google Console and create new credentials. By using this credential you will get fresh user cap of 100 users.

Note: Alternative solution is only temporary. Permanent solution is to verify the app with Google.

这篇关于iOS:Google Sigin错误,您的应用已被阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆