Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make it possible to update the session #7056

Merged
merged 21 commits into from
Mar 29, 2023
Merged

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Mar 25, 2023

Implements #3941 (comment)

  • Implementation
  • Documentation
  • Port to @auth/core (can be done in a separate PR)
  • Tested locally, we can add one together with @auth/core. We don't currently have a good E2E setup. 😬

🎫 Affected issues

#596, #2208, #2129

@vercel
Copy link

vercel bot commented Mar 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
next-auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 27, 2023 at 2:51PM (UTC)
2 Ignored Deployments
Name Status Preview Comments Updated
auth-docs ⬜️ Ignored (Inspect) Mar 27, 2023 at 2:51PM (UTC)
auth-docs-nextra ⬜️ Ignored (Inspect) Mar 27, 2023 at 2:51PM (UTC)

@github-actions github-actions bot added client Client related code core Refers to `@auth/core` TypeScript Issues relating to TypeScript labels Mar 25, 2023
@github-actions
Copy link

github-actions bot commented Mar 25, 2023

🎉 Experimental release published 📦️ on npm!

pnpm add next-auth@0.0.0-pr.7056.ced446b7
yarn add next-auth@0.0.0-pr.7056.ced446b7
npm i next-auth@0.0.0-pr.7056.ced446b7

@balazsorban44 balazsorban44 merged commit 2d907f0 into v4 Mar 29, 2023
@balazsorban44 balazsorban44 deleted the feat/update-session branch March 29, 2023 03:43
@ajin-iqness
Copy link

@ThangHuuVu Could you please tell me when this feature will be available? I am currently using 4.20.1 and this feature not available.

@ajin-iqness
Copy link

@ThangHuuVu Could you please tell me when this feature will be available? I am currently using 4.20.1 and this feature not available.

I got this when updated to 4.21.0 💯

@ttebify
Copy link

ttebify commented Apr 3, 2023

Thank you, @balazsorban44, for addressing this issue. I previously had to resort to some unconventional workarounds. For those interested in integrating this fix, please refer to the updated documentation at: https://next-auth.js.org/getting-started/client#updating-the-session.

@rokob
Copy link

rokob commented Apr 25, 2023

  • Port to @auth/core (can be done in a separate PR)

Is there an issue tracking this or a PR in progress?

@agsola
Copy link

agsola commented May 7, 2023

Thank you, @balazsorban44, for addressing this issue. I previously had to resort to some unconventional workarounds. For those interested in integrating this fix, please refer to the updated documentation at: https://next-auth.js.org/getting-started/client#updating-the-session.

It is possible to update the session from the server using getServerSession?

I'm currently doing it calling again "getServerSession" with new params, but it would be nice to have a better "official" support.

balazsorban44 added a commit that referenced this pull request May 10, 2023
Integrates #7056 into `@auth/core`
balazsorban44 added a commit that referenced this pull request May 10, 2023
* feat: add update session to core

Integrates #7056 into `@auth/core`

* resolve default user after jwt callback
balazsorban44 added a commit that referenced this pull request Jun 1, 2023
* feat: add update session to core

Integrates #7056 into `@auth/core`

* resolve default user after jwt callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Client related code core Refers to `@auth/core` providers TypeScript Issues relating to TypeScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants