You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS Swift应用中Google SignIn弹窗显示额外权限提示是否正常?

iOS Swift谷歌登录弹窗显示额外权限请求是否正常?

我正在开发iOS Swift应用,集成了Google SignIn组件,但登录时弹窗出现提示:“App Wants additional access to your google account”,想确认这个提示是否正常。

谷歌登录权限提示弹窗

以下是我的实现代码:

@IBAction func onGoogle(_ sender: Any) {
    guard let clientID = FirebaseApp.app()?.options.clientID else { return }
    let config = GIDConfiguration(clientID: clientID)
    GIDSignIn.sharedInstance.configuration = config

    GIDSignIn.sharedInstance.signIn(withPresenting: self) { [weak self] signInResult, error in
       
        if error != nil {
            return
        }
        
        guard let signInResult = signInResult else { return }

        let user = signInResult.user
        
        let givenName = user.profile?.givenName ?? ""
        let familyName = user.profile?.familyName ?? ""
        let email = user.profile?.email ?? ""
        let token = user.accessToken.tokenString

        let socialData: [String: String] = [
            "name": givenName + " " + familyName,
            "email": email,
            "token": token,
            "login_type": LOGIN_TYPE.google.rawValue.description,
        ]
        print(socialData)
     }
}

我已经尝试过StackOverflow等平台的解决方案,希望能排查代码中是否存在问题。

内容的提问来源于stack exchange,提问作者Irfan Saeed

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 13:53:15