No exported member 'useAuth' in Payload v3.0

default discord avatar
aronhawkins3 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 help straight from the Payload team with an Enterprise License.