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.

How can set no expiration for Auth?

default discord avatar
japineda16last year
1

Hi, I read the official doc, and I saw that I can setting up a tokenExpiration field, but I need that the system never expires.



There's exist some way to avoid JWT token expiration?

  • default discord avatar
    imcorfitzlast year

    In theory you would always want token expiration. You can then use the

    refresh token

    endpoint to renew whenever it expires. But keeping a token indefinitely is not secure. Would API Keys maybe be a more suitable solution in your case?

    https://payloadcms.com/docs/authentication/config#api-keys
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.