Tag: google oauth2

Google OAuth不再支持渐进式应用程序?

我有一个渐进的应用程序(定义在https://developers.google.com/web/progressive-web-apps/ ),它刚刚开始得到disallowed_useragent启动谷歌OAuthstream 我发现这个通知https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html 看来,渐进的应用程序不应该被拒绝stream量。 渐进的应用程序不是一个embedded式的web视图,它是相同的网页和没有控制的常规浏览器。 没有本地层,我不能使用原生SDK 渐进networking应用的新推荐方法是什么?

iPhone上的Google帐户链接操作

按照这里描述的文档,我设置了隐式授权的帐户链接,并发现它在使用浏览器/操作控制台进行testing时效果很好,并且也适用于Android版Google Home应用。 不幸的是,在iPhone版本的应用程序,用户身份validation挂起大部分时间。 谷歌支持的行动反馈是,问题是谷歌loginstream程是在单独的浏览器选项卡(窗口)中实现的。 在iPhone上,您不能在SfariViewController中打开2个窗口,因此他们正在重写第一页的地址,无法完成loginstream程。 这是已知的问题,他们不打算改变这一点。 解决scheme是在一个浏览器窗口中实现loginstream程。 我不清楚如何做到这一点,我正在寻找一个人共享代码背后的授权URL,你设置的iPhone一直工作。 以下是我正在使用的核心: .html片段: <!DOCTYPE html> <html> <head> <title>Authorization Page</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="google-signin-client_id" content="948762963734-2kbegoe3i9ieqc6vjmabh0rqqkmxxxxx.apps.googleusercontent.com"> <!– <meta name="google-signin-ux_mode" content="redirect"> INCLUDING THIS META TAG BREAKS THE AUTH FLOW –> <script src="js/googleAuth.js"></script> <script src="https://apis.google.com/js/platform.js" async defer></script> <link rel="stylesheet" href="css/googleAuth.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <body> <header class="bgimg-1 […]

iOS:GPPSignInButton总是要求“有离线访问”权限

我已经基于以下设置了GPPSignInButton: https://developers.google.com/+/mobile/ios/sign-in#enable_server-side_api_access_for_your_app let googleSignIn = GPPSignIn.sharedInstance() googleSignIn.clientID = GoogleClientID googleSignIn.attemptSSO = true googleSignIn.homeServerClientID = GoogleServerClientID googleSignIn.scopes = ["https://www.googleapis.com/auth/plus.login", "https://www.googleapis.com/auth/plus.profile.emails.read"] googleSignIn.delegate = self googleSignInButton.colorScheme = kGPPSignInButtonColorSchemeLight googleSignInButton.style = kGPPSignInButtonStyleWide 当用户第一次idToken时,它会要求正确的权限,并返回转发给服务器的idToken ,并交换access_token / refresh_token。 但是,在调用GPPSignIn.sharedInstance().signOut()之后,再次login将总是要求“有离线访问”权限。 我已经通读了其他一些SOpost,其中大多数引用了URL参数“approval_prompt”和“access_type”。 鉴于我正在使用iOS SDK,我没有能力设置这些参数。 应用程序在networking视图中路由到的url是: https://accounts.google.com/o/oauth2/auth?gpsdk=1.7.1&audience=<server-client-id>&response_type=code&verifier=94014002&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.profile.emails.read&gpbtn=1.1&hl=en&redirect_uri=<redirect_uri>&client_id=<client-id>&state=702574 我在服务器端有相同的范围(“login”和“电子邮件”),我不知道我需要做什么,所以它并不总是要求权限离线访问。