1
我的Silverlight OOB应用程序,需要添加谷歌的OAuth 2.0 我使用这个article作为参考:Silverlight的OOB和谷歌的OAuth 2.0
我试图用WebBrowser控制发送请求,谷歌验证服务。
代码示例是非常简单的
var url = new Uri("https://accounts.google.com/o/oauth2/auth?
redirect_uri=urn:ietf:wg:oauth:2.0:oob&
response_type=code&
scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&
client_id=<my_client_id>");
WebBrowser.Navigate(url);
,但我不断收到此错误WebBrowser.Navigate Attempted to perform an unauthorized
操作。
我试图http ://localhost
为REDIRECT_URI(结果是一样的)
Isthere任何方式使Silverlight应用程序OOB版本这项工作