azure - 如何在 Azure AD 重定向 URI 中添加带参数的回复 URI?

标签 azure redirect oauth-2.0 azure-active-directory adal

当我使用参数导航到我的 URL http://localhost:4200/meal/3 (URL 中的数字 3 是参数)时,我收到一条错误消息 “请求中指定的回复 URL 与为应用程序配置的回复 URL 不匹配”。

但是当我尝试访问没有参数的 URL http://localhost:4200 时,它工作正常,没有错误。

我尝试使用“Azure AD 重定向 URI”中的参数配置 URL,但“Azure AD 重定向 URI”中的 URL 似乎需要具有硬编码参数值的 URL,而这不起作用我有数百个带参数的 URL .

我尝试在 Azure AD 重定向 URI 中配置重定向 URL 以匹配任何参数值。 http://localhost:4200/meal/{id} 但它不起作用。

我想找到一种在 Azure AD 重定向 URI 中配置 URL 的方法,以便它们可以匹配我的应用 URLS 参数,而无需在 URL 中添加硬编码值

最佳答案

有一个名为 state 的参数,文档说您可以对用户特定的数据进行编码,以通过 token 将其取回。

state: A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross-site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred, such as the page or view they were on.

看看here ,这可能就是您正在寻找的东西。

关于azure - 如何在 Azure AD 重定向 URI 中添加带参数的回复 URI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58451429/

相关文章:

azure - AAD 应用程序注册不接受查询字符串参数

python - Databricks:没有名为 azure.storage 的模块

spring - OAuth2RestTemplate 承载 token 类型

spring-boot - EnableAuthorizationServer 2.4.0 迁移

javascript - 从node.js googledrive api返回结果

reactjs - 如何在 azure devops 构建中读取 azure key Vault 设置并使它们在 Web SPA 中可用

azure - 使用数据工厂创建管道,并将事件从 azure blob 存储复制到数据湖存储

python - 将命令重定向到 Python 中另一个的输入

regex - 使用另一个 get params 重写查询字符串

unix - 重定向无法正常工作,2>/dev/null 变为 2 >/dev/null 并且 stderr 不会被重定向