在本地主机上使用 Azure LS1 API 运行登录它工作正常,但是在服务器上迁移脚本我收到以下错误:
AADSTS50011:请求中指定的回复 url 与为应用程序配置的回复 url 不匹配:
我知道问题出在 Azure 门户中的应用程序设置上,我应该在其中使用服务器地址而不是 localhost:30662 更改重定向 URI,但问题出在这里:因为应用程序必须在内部服务器上运行像 192.168.1.xxx 这样的地址和 Azure 门户需要一个带有 https://认证的地址,如果与本地主机不同,我该如何管理它以不在本地服务器上安装 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 的格式已更改。它们需要与应用程序类型(网络或公共(public))相关联。此外,出于安全原因,不支持通配符和 http://方案(http://localhost 除外)。
如果必须使用http://schemes
,可以返回使用App registrations(Legacy)。
关于javascript - Azure Active Directory API 中的错误重定向 URI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58322210/