【发布时间】:2013-06-04 18:37:17
【问题描述】:
我有 silverlight oob 应用程序,需要添加 Google OAuth 2.0 我使用这个article 作为参考:
我尝试使用WebBrowser Control 向 Google Auth Service 发送请求。
代码示例非常简单
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(结果相同)
有什么方法可以在 Silverlight App OOB 版本中进行这项工作
【问题讨论】:
标签: c# silverlight google-oauth silverlight-oob