Currently I use useUser from lib/hooks as well as cookieStore.get("session") to see if user is logged in. Sometimes page does not load and shows user is not logged in with these tactics. Looking to streamline how we check user permissions and how we can pull theuser._id` for adding info to database etc.
Currently I use
useUser
fromlib/hooks
as well ascookieStore.get("session") to see if user is logged in. Sometimes page does not load and shows user is not logged in with these tactics. Looking to streamline how we check user permissions and how we can pull the
user._id` for adding info to database etc.