How to make variables persistent in angular?

I have a problem. So, I’m creating an angular application that a user need to be validated, approved by someone and has a role. Basically I have 3 variables: isApproved, role and isValidated. Also I have a JWT token for authentication and authorization. How should I make these 3 variables persistant? I want to diplay users different pages if they are validated, or if they are only approved, or if they have only a specific role and they are validated, but not approved, and so on.
I’m thinking of storing them in local storage, but the user can change the values there. Another way that I think is that everytime a user refresh the page, to call an API that give me these 3 variables from the backend, but I don’t know if this is a good way to do that. Or is there any way of getting the values from token? Like using claims or something, and decoding the token on the client side to get the values?
Please help me if you can. Thanks and have a good day! 🙂

How to replace XML string into another XML string

<recurrence> <interval>1</interval> <unit>O</unit> <firsttime>2021-02-12T17:42:00</firsttime> <lasttime>1900-01-01T12:00:00</lasttime> </recurrence> <output> <outputformat>TXT</outputformat> <delimiter>,</delimiter> <filename>testfile1</filename> <path>\AIR-LAP-700053TestGEMOutput</path> <appendtofile /> <content> <type>NORMAL</type> <storedprocedure /> <outputitems> <outputitem> <field> <tablename>VW_DOCUMENT</tablename> <fieldname>GUID</fieldname> </field> <format> <type>CHAR</type> <specification /> </format> </outputitem> <outputitem> <field> <tablename>VW_DOCUMENT</tablename> <fieldname>PHYSICAL_DOC_GUID</fieldname> </field> <format> <type>CHAR</type> <specification /> </format> </outputitem> <outputitem> <field> <tablename>VW_DOCUMENT</tablename> <fieldname>DOC_TYPE</fieldname> </field> <format> <type>CHAR</type> <specification /> </format> </outputitem> </outputitems> <criteria> <criterion> <field> … Read more