Bjarne Fyrstenborg
02/03/2025, 1:48 PMLuuk Peters (ProudNerds)
02/03/2025, 2:02 PMRichard Soeteman
02/03/2025, 4:36 PMBjarne Fyrstenborg
02/03/2025, 7:34 PMLoginPath
set it respected by MediaProtect as well.
We have the following based on Kenn's demo: https://github.com/kjac/UmbracoDeliveryApiAuthDemo
public class ConfigureCustomMemberLoginPathComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
=> builder.Services.ConfigureOptions<ConfigureCustomMemberLoginPath>();
private class ConfigureCustomMemberLoginPath : IConfigureNamedOptions<CookieAuthenticationOptions>
{
public void Configure(string? name, CookieAuthenticationOptions options)
{
if (name != IdentityConstants.ApplicationScheme)
{
return;
}
Configure(options);
}
public void Configure(CookieAuthenticationOptions options)
=> options.LoginPath = "/login";
}
}
When accessing protected content it redirects to /login
Richard Soeteman
02/04/2025, 7:46 AMBjarne Fyrstenborg
02/04/2025, 1:30 PMRichard Soeteman
02/04/2025, 1:53 PMBjarne Fyrstenborg
02/04/2025, 1:59 PM