Skip to content

Conversation

@panva
Copy link
Contributor

@panva panva commented Oct 27, 2021

@balazsorban44 as discussed previously, updates


openid-client to v5.x (c73c0c9)

Fairly painless update, changes to providers

  • facebook: this was repeated code, the default request does the same
  • foursquare: accessToken was passed as undefined to userinfo, this is now forbidden in openid-client@5 and so a regular https request is triggered instead

jose to v4.x (78f0919)

This removes most of the jwt options as we discussed, the session is now a JWT in JWE syntax. The secret used is always derived from the secret passed in, warnings were removed. Compression before encryption was removed as doing so leaks information about the plaintext.


Both of these libraries have an engines entry which is now also reflected in package.json

@github-actions github-actions bot added core Refers to `@auth/core` providers labels Oct 27, 2021
@panva panva changed the title fix: remove compression before encryption Oct 27, 2021
@panva panva marked this pull request as ready for review October 27, 2021 18:08
@balazsorban44 balazsorban44 changed the title core deps update Oct 27, 2021
@balazsorban44 balazsorban44 merged commit 72408ab into nextauthjs:beta Oct 27, 2021
@balazsorban44
Copy link
Member

Docs will have to be updated to reflect this change.

balazsorban44 pushed a commit that referenced this pull request Apr 5, 2022
* docs: Update JWT docs to reflect JWE changes in v4

This PR #3039 changed the defaults for JWT tokens to be encrypted by default (JWE). We have conflicting documentation across the docs site and readme.

Additionatlly this PR #3783 made providing a secret required in production via NEXTAUTH_SECRET or an option.

* Missed a reference

* Update docs/docs/faq.md

Co-authored-by: Nico Domino <yo@ndo.dev>

* Update docs/docs/faq.md

Co-authored-by: Nico Domino <yo@ndo.dev>

Co-authored-by: Nico Domino <yo@ndo.dev>
mnphpexpert added a commit to mnphpexpert/next-auth that referenced this pull request Sep 2, 2024
Updates the `jose` and `openid-client` packages.

BREAKING CHANGE:

The `jwt` option has been simplified and the NextAuth.js issued JWT is now encrypted by default.

If you want to override the defaults, you can still use the `encode` and `decode` functions. These are advanced options and they should only be used if you know what you are doing.

The default secret generation has been removed in this PR, which will be added back in a separate one. Remember, that is only for developer convenience, it is **highly** recommended to always create your own secret for production.
mnphpexpert added a commit to mnphpexpert/next-auth that referenced this pull request Sep 2, 2024
* docs: Update JWT docs to reflect JWE changes in v4

This PR nextauthjs#3039 changed the defaults for JWT tokens to be encrypted by default (JWE). We have conflicting documentation across the docs site and readme.

Additionatlly this PR nextauthjs#3783 made providing a secret required in production via NEXTAUTH_SECRET or an option.

* Missed a reference

* Update docs/docs/faq.md

Co-authored-by: Nico Domino <yo@ndo.dev>

* Update docs/docs/faq.md

Co-authored-by: Nico Domino <yo@ndo.dev>

Co-authored-by: Nico Domino <yo@ndo.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Refers to `@auth/core` providers

2 participants