Skip to main content

Module: jwt

@authjs/core/jwt provides functions to encode and decode JWTs issued and used by Auth.js. It is meant for being used in the app only. If you need JWT authentication for your API, you should rely on your Identity Provider.

The JWT created by Auth.js is encrypted using the A256GCM algorithm (JWE). by default. It uses the AUTH_SECRET environment variable to dervice a sufficient encryption key.

See

RFC7519 - JSON Web Token (JWT)

Functions​

Interfaces​