Your application being an SPA at the end, if you want to bypass a middleware with it's security checkup, you could disable the JS on the page. But then, since no content is generated directly, you won't see anything because it's not here (as a static file).
If your app is isomorphic (basically has a ssr: true
), the auth module will still disable the access to those pages (you can double check).
At the end, the critical info is received when:
- you do have a valid JWT token (after some login)
- you submit an HTTP query to the backend
- the backend acknowledges it and the token is valid
- the backend gives you the sensitive info via an HTTP response
At the end, your client side code doesn't need to be secure. If somebody somehow hacks your client side state and reaches the sensitive page, he will still not have a valid JWT token since the verification still happens on the backend.
The one that can be generated only when sending the proper credentials to the backend and having the backend validating those.
one way to display secure data on a page is to access it using asyncData from a secure backend API
where do you get this one from? Not sure to understand how is this more secure even withtarget: 'server'
since this hook will be client sided once the hydration is done. – Rehashforget Nuxt backend, think regular non-nuxt backend
here. – Rehash@kissu
in your question edit is not sending me a notification btw. I am following it tho. – Rehash