nuxt-session
nuxt-session copied to clipboard
Make mandatory session properties immutable
Closes #2.
Checklist:
- [x] issue number linked above after pound (
#)- replace "Closes " with "Contributes to" or other if this PR does not close the issue
- [x] manually checked my feature / checking not applicable
- [x] wrote tests / testing not applicable
- [x] attached screenshots / screenshot not applicable
Attach a session object to the event context with mandatory immutable properties id, createdAt and ip.
When the user wants to reassign those properties, an error is thrown. This is better than just doing nothing, because the user knows that he did something wrong in saving properties to the session in the event context.