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.

Additional User Data in Auth

default discord avatar
Sandro Wegmannlast year
3

I need to add an attribute to the user called activeSite which should be used in access control. However, it seems like by default, only user email and collection are stored in the auth object of the user.



How can I add an additional field to the auth user object?

  • default discord avatar
    thisisnotchrislast year

    @Sandro Wegmann I think you need to add the saveToJWT property for the field



    To add fields to the auth token

  • default discord avatar
    Sandro Wegmannlast year

    Ah thanks a ton! I had such a property in mind but couldn’t find it anywhere 😄

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..