signInSilently() generates an error code=-4

前端 未结 8 1851
日久生厌
日久生厌 2020-12-20 11:24

I\'m having this case where the GIDSignIn.sharedInstance().signInSilently() is returning an error:

Error Domain=com.google.GIDSignIn Code=-4 \"The op

8条回答
  •  执笔经年
    2020-12-20 11:55

    I've had the same problem. The problem was in method:

    [[GIDSignIn sharedInstance] setScopes:@[@"https://www.googleapis.com/auth/plus.stream.read", @"https://www.googleapis.com/auth/plus.me"]];
    

    you should call it before:

    [[GIDSignIn sharedInstance] hasAuthInKeychain]    
    

    and

    [[GIDSignIn sharedInstance] signIn]   
    

提交回复
热议问题