hooks.client.js does not support handle() so how I prevent user from navigating when no cookies? #7082
malalecherocks
started this conversation in
General
Replies: 1 comment 5 replies
-
I'd have a |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I normally give the user a cookie, and I used to check in hooks.js (handle()) if the user had a cookie if not redirect to login, now I see there are two separates hooks:
hooks.server.js
hooks.client.js
If I implement it in handle in hooks.server.js only is checked in hard refresh or in a fetch from the client.
And I see it's not possible to implement it in hooks.client.js
How can I do this? or any other suggestion?
Beta Was this translation helpful? Give feedback.
All reactions