member group that needs to expire after 14days, it currently checks for that on login and removes the member group if required, but with a perpetual auth cookie keeping the member signed they can maintain access. I was hoping for an event hook for accessing a protected page, so I can also do the check then, rather than on every page visit?
s
Sebastiaan
07/27/2023, 8:16 AM
Probably better to run a background project and check the age of the member, if created >14 days ago, remove the role.
There's this Hangfire package 😇 that can help you create scheduled tasks. https://marketplace.umbraco.com/package/cultiv.hangfire
m
Mike Chambers
07/27/2023, 9:43 AM
yeah had thought of that (or even just the core
RecurringHostedService
), but event driven pattern at point of access would be better 🙂
Another thought was to replace IPublicAccessService with my own concrete implementation and extend