Hi
I'm having problems using the lifecycle hooks.
I'm trying to check if the user is logged in before each route.
Does anyone have a good example of a lifecycle hook which checks if a user is logged in and if not redirects the user to "/login".
I'm storing a login token in a cookie which i use to check if the user is logged in or not.
Hi I'm having problems using the lifecycle hooks. I'm trying to check if the user is logged in before each route. Does anyone have a good example of a lifecycle hook which checks if a user is logged in and if not redirects the user to "/login". I'm storing a login token in a cookie which i use to check if the user is logged in or not.