I want to improve my security of my web-applications and started to look for actual security concepts for Angular >= 10.
So I came over HTTPOnly cookies, which seemed to be state-of-the art. Since now, I only worked with "Standard" JWT tokens and extracted the props e.g. iat, exp and my data from the jwt and built related guards based on it.
But if I understood it correct as stated here HTTP Only Stackoverflow Question the cookie can not be accessed on the client side.
So my question to you is:
How can I build up a role based guard on the client side, without accessing the cookie and not duplicating the effort to still send the jwt-token via the request header.
Thanks a lot in advance for your comments! Best regards Ragitagha
Update: A related, but not identical discussion about cookies and jwt is running here: to other related discussion
But still a "best practice" is missing for me!