首页 > 解决方案 > Azure 目录中应用的回调 URL

问题描述

我需要为回调 url 添加一个自定义方案,比如myapp://example.com/oauth/callback能够重定向回 ios 和 android 设备中的应用程序,但我不能这样做,因为它说架构无效(它只允许http://and https://)。

我在那里做:

Azure Active Directory -> App registration -> app -> Reply URL

有什么解决方法吗?

标签: azureoauthazure-active-directory

解决方案


而不是尝试通过

Azure Active Directory -> App registration -> app -> settings -> Reply URL

导航

Azure Active Directory -> App registration -> app -> Manifest 

这是设置旁边的中间按钮。在此处输入图像描述

在那里,您将看到应用程序的 JSON 表示。搜索一个名为

"replyUrls": [],

在其中添加回复网址,然后按顶部的保存。

"replyUrls": [
    "myapp://example.com/oauth/callback"
],

导航回

Azure Active Directory -> App registration -> app -> settings -> Reply URL

并验证已设置回复 url。

这应该可以工作,因为客户端代码正在执行验证而不是服务器端。

希望这可以帮助


推荐阅读