javascript - Azure Active Directory API 中的错误重定向 URI
问题描述
在本地主机上使用 Azure LS1 API 运行登录它工作正常,但是在服务器上迁移脚本我收到以下错误:
AADSTS50011:请求中指定的回复 url 与为应用程序配置的回复 url 不匹配:
我知道问题出在 Azure 门户中的应用程序设置上,我应该使用服务器地址而不是 localhost:30662 更改重定向 URI,但问题出在此处:因为应用程序必须在地址为 192.168 的内部服务器上运行.1.xxx 和 Azure 门户需要一个带有 https:// 认证的地址(如果与 localhost 不同),我该如何管理它以不在本地服务器上安装 SSL 证书?有没有办法在没有 https:// 的情况下插入重定向 URI?
var msalConfig = {
auth: {
clientId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
authority: "https://login.microsoftonline.com/organizations"
redirectURI: "http://192.168.1.xxx:30662"
},
cache: {
cacheLocation: "localStorage",
storeAuthStateInCookie: true
}
};
AADSTS50011:请求中指定的回复 url 与为应用程序配置的回复 url 不匹配:
解决方案
在旧版体验中,支持使用http:// schemes
. 在新体验中,重定向 URI 的格式已更改。它们需要与应用类型(网络或公共)相关联。此外,出于安全原因,不支持通配符和 http:// 方案(http://localhost除外)。
如果您必须使用http:// schemes
,您可以返回使用 App 注册(旧版)。
推荐阅读
- c++ - 'View v' 类型不完整,无法定义 C++
- ios - 在 swift5 中:iPad 上的弹出窗口大小合适,但在 iPhone 上却使用全屏?
- jdbc - PostgreSQL JDBC 接收器引发错误 null(Array) 类型没有到 SQL 数据库列类型的映射
- c - 关于使用命令行设置vino
- c# - 使用 ContentControl 将图片附加到 Word
- javascript - PHP base64_decode 无法解码完整的 javascript btoa 编码
- linux - packet_write_wait:连接到@host 端口 22:管道损坏
- python - 使用python在字典中迭代
- node.js - MacOS本地不同的NodeJS,如何找到并删除它们?
- python - 找不到上传图片的方法(与元素交互)