Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

No exported member 'useAuth' in Payload v3.0

default discord avatar
aronhawkins6 months ago

I am setting up a project using Payload v3.0. I tried following the suggestion recommended here:

https://payloadcms.com/community-help/discord/add-user-profile-picture

to add a custom user Avatar. However, whenever I try importing the 'useAuth' hook, I get the following error: 'Module "payload/components/utilities" has no exported member "useAuth"'. Any tips on getting access to the 'User' object in Payload v3.0?



I think I figured it out. In v3.0, useAuth got moved to '@payloadcms/ui/providers/Auth'

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team..