iOS: Google Authentication Code

后端 未结 5 2206
刺人心
刺人心 2021-02-09 10:49

I am working with authenticating user to use the google account he is associated with. The problem is that everytime the user logs in through my app, the \"Allow Access\" always

5条回答
  •  逝去的感伤
    2021-02-09 11:20

    I know this is an old question, but I encountered the same issue so I'm writing my solution, it might help somebody else in the future.

    Turns out it's not sufficient to only set self.auth, you also need to set the self.analyticsService.authorizer variable

    if ([self.auth canAuthorize])
    {
        self.analyticsService.authorizer = self.auth;
        [self getAnalyticsData];
        return;
    }
    

    This did the trick for me, the user is no longer asked to enter the credentials.

提交回复
热议问题