Best set up for Nuxt.js

Hi guys!
I started working with auth0-js library on my Nuxt.js app because I need two custom login/register forms provided by designers. (It seems that it is the only sdk that gives you free control about this situation)

After calling the parseHash method I have the accessToken and the idToken.

Now what is the best way to protect my pages that need authentication?

Nuxt.js provides us middlewares but they run on the server side at the first load of the page and the checkSession method return “window is not defined”.

Any suggestions are very appreciated.
Thanks in advance

there is the nuxt auth0 module you can use, where you have some functionality out of the box, without getting your hands dirty with configuration:

1 Like

Thanks for sharing that @p.vakalopoulos!