Skip to content

Remove old actions related to External Authentication #16893

Closed

Description

@MikeAlhayek

Remove this

https://github.com/OrchardCMS/OrchardCore/blob/main/src/OrchardCore.Modules/OrchardCore.Users/Controllers/AccountController.cs#L259-L269

also this

/// <summary>
/// In version 2.1, the "External Authentication" feature was introduced, necessitating the relocation of all external authentication actions to a new controller.
/// To maintain backward compatibility, this filter was added to automatically redirect requests from the old path to the new path, ensuring existing users were not impacted.
///
/// In version 3.0, this filter should be removed. The following note should be included in the 3.0.0 release notes:
///
/// ## Breaking Changes
/// ### Login View Update
/// The `ExternalLogin` action has been removed from the `Account` controller.
/// If you are using a custom `Login.cshtml` view or `Login` template, please update the external login form action.
/// As of this update, the `ExternalLogin` action has been relocated to the `ExternalAuthentications` controller.
/// </summary>
internal sealed class ExternalAuthenticationsStartupFilter : IStartupFilter
{
public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next)
{
return builder =>
{
builder.Use(async (context, next) =>
{
if (context.Request.Method == HttpMethods.Post &&
context.Request.Path.StartsWithSegments("/OrchardCore.Users/Account/ExternalLogin", StringComparison.OrdinalIgnoreCase))
{
context.Request.Path = "/OrchardCore.Users/ExternalAuthentications/ExternalLogin";
context.Request.RouteValues["controller"] = typeof(ExternalAuthenticationsController).ControllerName();
context.Request.RouteValues["action"] = nameof(ExternalAuthenticationsController.ExternalLogin);
context.Request.RouteValues["area"] = "OrchardCore.Users";
}
await next();
});
next(builder);
};
}

Activity

  1. added this to the 3.0 milestone on Oct 15, 2024
  2. github-actions commented on Oct 15, 2024

    @github-actions
    Contributor

    We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

    This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions