Like what we’re doing? Star us on GitHub!

Export "AuthContext" and "useAuth" in "payload/auth"

5 months ago
1 1

I am playing around with the admin.avatar configuration and it was very difficult to spot the proper location for useAuth (similarly to what happens here:

I was able to import useAuth from payload/dist/admin/components/utilities/Auth but it's pretty nested.

Would it be possible to move the useAuth into payload/auth?


  • jacobsfletch
    Payload Team
    2 months ago

    @finkinfridom absolutely! It's in our roadmap to significantly improve our component library, including how components are exported as you mentioned, and also documentation. Here's a related discussion: #1729

    If you need this right away we'd be happy to accept a PR!

Open the post
Continue the discussion in GitHub
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More