【问题标题】:specifying a custom return Url in Auth0 logout produces an error在 Auth0 注销中指定自定义返回 URL 会产生错误
【发布时间】:2019-07-27 01:47:50
【问题描述】:

我有 asp.net core Auth0 指南中定义的以下内容:

if (user == null)
            {
                await HttpContext.SignOutAsync("Auth0", new AuthenticationProperties
                {
                    RedirectUri = Url.Action("Error", "Account")
                });
                await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
            }

我希望将用户重定向到 /Account/Error 页面,但我收到以下错误:

“returnTo”查询字符串参数 “http://localhost:60856/Account/Error”未定义为有效 URL 在“允许的注销 URL”中。要添加新 URL,请在此处进行: https://manage.auth0.com/#/applications/C3hMD9L4om3hhlddrZbIFgvU2CnDcXcf/settings

但问题是我已经在我的租户设置允许的 urls 文本框中添加了该 url。这是 auth0 端的问题吗?

【问题讨论】:

    标签: asp.net-core-mvc auth0


    【解决方案1】:

    你是如何从那里重定向的?我建议捕获一个 HAR 文件并检查它的去向。乍一看,如果您的仪表板设置正确,您可能会遇到 RedirectURI 问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-29
      • 2017-03-19
      • 2013-07-26
      • 2020-09-24
      • 1970-01-01
      • 1970-01-01
      • 2019-10-07
      • 1970-01-01
      相关资源
      最近更新 更多