Custom ConfigureMemberCookieOptions doesn't work anymore
See original GitHub issueWhich Umbraco version are you using? (Please write the exact version, example: 10.1.0)
11.4.0
Bug summary
This is while using the following attribute: [UmbracoMemberAuthorize]
When on version 11.2.2, I added a ConfigureCustomMemberCookieOptions
class which redirects the Umbraco Member to the login page, when the Member wasn’t authorized to view a specific page. This class is registered in a Composer.
After I upgraded my local application to version 11.4.0, that same class didn’t work anymore, and instead of a redirect to the login page, I get a page that just shows the following: HTTP ERROR 401.
I didn’t change anything to the implementation, and I still have a working version of this running on a staging environment, where the Member is redirected to the login environment.
I looked at the changes, and maybe it might have something to do with the following bug fix? https://github.com/umbraco/Umbraco-CMS/pull/14036/files/339c9c89cb8f9f17e257719632f460cdbf8fdeda
Specifics
A simplified version of my custom ConfigureMemberCookieOptions implementation
Registering in the Composer
builder.Services.ConfigureOptions<ConfigureCustomMemberCookieOptions>();
Steps to reproduce
Add a class which implements IConfigureNamedOptions<CookieAuthenticationOptions>
and configure this in startup/composer (see Specifics).
In Umbraco 11.2.2, this will make sure that the Member is redirected to a specific page, if the Member isn’t authorized.
In Umbraco 11.4.0 this will render a basic 401 error page with the message: This page isn’t working If the problem continues, contact the site owner. HTTP ERROR 401
Expected result / actual result
No response
This item has been added to our backlog AB#30478
Issue Analytics
- State:
- Created 3 months ago
- Comments:7 (5 by maintainers)
Thanks for the sample code, I can definitely reproduce this!
Fixed in: #14399