1

我目前正在努力在 WinRT Metro Javascript 应用程序中实现 Google API OAuth。问题是我无法提供任何适用于 Metro 应用程序的有效 redirect_uri。已安装应用程序的 urn:ietf:wg:oauth:2.0:oob URL 不起作用,我无法想象在可以处理重定向的 Javascript 应用程序中托管 HttpListener 的方法。

有什么建议么?

4

1 回答 1

0
START URI = https://accounts.google.com/o/oauth2/auth?client_id= Ur Client ID &redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile

End URI =https://accounts.google.com/o/oauth2/approval?
Windows.Security.Authentication.Web.WebAuthenticationBroker.authenticateAsync(Windows.Security.Authentication.Web.WebAuthenticationOptions.useTitle, startURI, endURI)
   .then(function (result) {
}

以上是我的代码的一些一瞥,所以我粘贴在这里..你可以试试这个它会对你有所帮助。

于 2013-12-09T10:53:17.463 回答