Hello! I really enjoyed using wappler to start, but there’s something I cannot figure out and hoping someone here can help
We have built our own API and authentication service. I am using wappler to build the front end of the application. Right now, when someone logs in, we send an API request to an endpoint, which returns a jwt access token and refresh token. I am attempting to decode the token that I receive using wappler server actions, so that I can determine if someone is logged in or not.
Currently, I am using an API form to send to the endpoint, and then set a global session variable to store the token I receive.
On the next page (called /dashboard) I am redirected to, I use a server connect component to call my server action. the server action reads the global session variable, then in my EXEcute commands, I use jwt decode to read my session variable.
On the /dashboard page, after the server connect component finishes running (it is the first component I call for reference), I would expect to be able to parse any of the data from the server connect component that decoded the jwt token. For testing purposes, in my markup I wrote {{serverconnect1.data}} and get [object Object] to print out, but there is nothing more I can do with this. I tried the parseJSON() and toJSON() formatters, I’ve tried to drill down to the next data element that I see on jwt.io (like {{serverconnect1.data.sub}}), but nothing seems to help me understand what’s inside of this object so that I can move to my next step of using the data for verification.
I’m happy to post screenshots and code, but wonder if there’s something I’m missing easily… It’s very possible!