【发布时间】:2019-03-26 01:19:05
【问题描述】:
我们使用“Microsoft.AspNet.Identity.Owin”和“Microsoft.Owin”框架构建自己的“OWIN OAuth 2.0 授权服务器”。参考:https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server
我们可以使用“DotNetOpenAuth.OAuth2.Client”向我们的自定义 OAuth2.0 服务器发送请求并从 Web 应用程序获取 OAuth2.0 访问令牌。
此外,我们可以成功地将我们的自定义 OAuth2.0 服务器与 Cortana bot 通道集成,并且工作正常。
但是,在将我们的自定义 OAuth2.0 服务器与 Xamarin 移动应用程序集成时,我们面临与 redirect_uri 相关的问题。我们收到类似 invalid_grant 的响应。
我们在 Xamarin 中使用“Xamarin.Auth”框架来发送 OAuth 请求。
-
这是我们在 Web 和 Mobile 中使用的 redirect_uri
一个。 Xamarin 应用程序 redirect_uri: com.Demo.Mobile:/oauth2redirect
b.网址redirect_uri:https://demowebsite.azurewebsites.net/
https://user-images.githubusercontent.com/5037741/54964768-10d0ca80-4f44-11e9-9fd9-92673f07f919.png
在此先感谢您的帮助:)
【问题讨论】:
-
请将相关代码添加到您的问题中。