Skip to content

[v5] plainCookie sets encrypted cookie #1550

Answered by thetutlage
rodymolenaar asked this question in Help
Discussion options

You must be logged in to vote

Hey. The cookie is not encrypted, just base64 encoded to avoid encoding issues, since with AdonisJS you can pass any datatype (Arrays, Objects) to cookies. So it is required to base64 encode them.

Just run the following code to get the cookie value.

JSON.parse(window.atob('eyJtZXNzYWdlIjoiQmVhcmVyIE16RS50SkhfY3RadTJ4VVNGeFlYNWlsOVVLNTN0Y2ZxeHF5OERnRUpIYW5SR05MUXdKWjJhTDhMU2dUVmdwQTAifQ'))

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rodymolenaar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants