2012-07-07 48 views
1

我正在努力在WinRT Metro Javascript应用程序中实施Google API OAuth。问题是我不能provide任何工作redirect_uri与Metro应用程序一起使用。已安装的应用程序的urn:ietf:wg:oauth:2.0:oob URL不起作用,我无法想象在JavaScript应用程序中托管HttpListener的方式,可以处理重定向。WinRT中的Google API OAuth 2.0 Javascript应用程序

有什么建议吗?

+0

urn:ietf:wg:oauth:2.0:oob URL的问题究竟是什么? – 2012-07-07 16:58:46

回答

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) { 
} 

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

相关问题