【问题标题】:Silverlight OOB and Google OAuth 2.0Silverlight OOB 和 Google OAuth 2.0
【发布时间】: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


    【解决方案1】:

    终于找到了解决办法。只需在浏览器外设置中勾选在浏览器外运行时需要提升信任

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多