Using JavaScript, can we determine whether a user is authenticated?
For example, if I wanted to conditionally hide a “logout” button.
Using JavaScript, can we determine whether a user is authenticated?
For example, if I wanted to conditionally hide a “logout” button.
Sorry for the slow reply on this:
You can check if authenticated from js and _calcs
with the following
vueapp.$store.state.auth.authenticated // returns true if authenticated