WaspW
Wasp2y ago
Jake

useAuth() usage

I made significant progress on my app using wasp over the weekend. I thought I will ask this before implementing something naive. Here is what i trying to resolve. There are 2 pages. An order page and an upload page. Order page requires authentication, Upload page does not. I have a Navbar component shared by both pages because Navbar is in the Layout page.
Navbar uses useAuth() to get user data and controls the rendering of the user dropdown (picture, edit profile, logout)
Now when I access the Upload page, I see a browser console error - 401 Unauthorized even though I haven't set authRequired to true. Is this happening because I am using useAuth() incorrectly. Can you please help?
Was this page helpful?