Answer the question
In order to leave comments, you need to log in
How to properly use nuxtjs auth module?
Good day!
I'm trying to make nuxtjs Auth module friends with keycloak. I did api authentication, without going to the keycloak page itself, while the access token itself is written to storage already decoded and I have access to properties, but when the page is reloaded, the auth module takes the access token from localStorage or cookie and writes it to storage not decoded. The question is how best to do it:
1. Perhaps there is some kind of observer to hang on the state.user property, in case of assigning new data,
overwrite with decoded data.
2. Make a getter that will decode the access token each time (at the same time, accordingly, do not decode the access token during primary authentication).
3. Any other options?
4. Perhaps there are ready-made solutions that I could not find?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question