[英]Silverlight OOB and Google OAuth 2.0
I have silverlight oob application and need to add Google OAuth 2.0 I'm using this article as reference: 我有silverlight oob应用程序,需要添加Google OAuth 2.0。我正在使用本文作为参考:
I tried to use WebBrowser Control to send request to Google Auth Service. 我尝试使用WebBrowser控件将请求发送到Google Auth Service。
Code sample is pretty simple 代码示例非常简单
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);
But I keep getting this error WebBrowser.Navigate Attempted to perform an unauthorized
operation. 但是我一直收到此错误
WebBrowser.Navigate Attempted to perform an unauthorized
操作。
I tried http ://localhost
as redirect_uri (result is the same) 我尝试将
http ://localhost
作为redirect_uri(结果是相同的)
Isthere any way to make this work in Silverlight App OOB Version 是否有任何方法可以在Silverlight App OOB版本中使其工作
Finally I have found solution. 终于我找到了解决方案。 Just need to check Require Elevated trust when running outside the browser in Out-of-Browser Settings.
在浏览器外设置中的浏览器外部运行时,仅需要选中“ 需要增强的信任 ”即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.