Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDamian Kosowski
19,746 PointsWhat is the reason for using both the MessageVerifier and a signed Cookie?
If the purpose of the MessageVerifier is to generate messages that are signed to prevent tampering and there is also a possibility to generate a signed and encrypted Cookie, why would we use both? As I understand we could just assign - cookies.permanent.signed = user.id and this should be enough to generate a signed token. Is it just to enhance security or is there any other reason for using both those techniques?