Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old actions related to External Authentication #16893

Closed
MikeAlhayek opened this issue Oct 15, 2024 · 1 comment · Fixed by #17049
Closed

Remove old actions related to External Authentication #16893

MikeAlhayek opened this issue Oct 15, 2024 · 1 comment · Fixed by #17049
Milestone

Comments

@MikeAlhayek
Copy link
Member

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);
};
}

@MikeAlhayek MikeAlhayek added this to the 3.0 milestone Oct 15, 2024
Copy link
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant