empreinte-digitale/orejime

Custom cookie duration based on consents

gtnsimon opened this issue · 1 comments

To offer more control to developers on how cookie duration is managed based on user consent, is it possible to allow cookieExpiresAfterDays to be a function ?

This function could take 2 arguments:

Motivations

I'm working with orejime on general public websites which requires this kind of behavior especially for users who click decline on Notice or decline all on Modal. It is a pure business needs but it gives more control than a static value.

This seems like a legit use-case, thank you for the PR.
I just made some small requests for adjustments, let me know what you think.