Hello folks,
I definitely can use some help building my first server side plugin once that I’ve being trying to debug my code for a while now.
I’m building a simple plugin to read a jwt cookie containing user information such as id, username and email and set those attributes as custom states in my page (Images 1 - 3).
My plugin uses two fields: jwt and secret. The plugin works fine when the jwt field is a static string. Nevertheless, when I try to pull the jwt string dynamically from the cookie it does not “appear” in the plugin - even though the plugin evaluates the field correctly (image 4) - and I get an empty jwt value that breaks the code when the jsonwebtoken package tries to run the verify function (Image 5).
Can anybody help me understand what I am missing or suggest a different approach to the task?
Thanks!
IMAGE 1:
IMAGE 2:
IMAGE 3:
IMAGE 4:
IMAGE 5: