next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

feat(core): Use AdapterSession retruned from updateSession function

Open codylittle opened this issue 1 year ago • 3 comments

☕️ Reasoning

Currently the updateSession function within Adapters has the option to return an AdapterSession, yet this session is just discarded. The ability to use this returned session allows for further customisation of business-specific logic within custom adapters without impacting existing available adapters.

🧢 Checklist

  • [x] Documentation
  • [x] Tests
  • [x] Ready to be merged

Note: I have updated session tests, how I am unable to run them as-is due to incorrect relative file paths. Updating the file paths by hand results in passing tests, but I have not committed these updates as I believe I like have local configuration incorrect.

Happy to discuss further if required.

codylittle avatar Apr 10 '25 07:04 codylittle

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

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2025 1:32pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview May 24, 2025 1:32pm

vercel[bot] avatar Apr 10 '25 07:04 vercel[bot]

@codylittle is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 10 '25 07:04 vercel[bot]

Hey @ThangHuuVu, anything else you'd like to see in the PR prior to reviewing? Happy to add additional tests if required.

codylittle avatar Apr 21 '25 05:04 codylittle

@ThangHuuVu does this align with the direction of the package? Should this be moved to a flag to ensure backwards compatibility?

codylittle avatar Jul 03 '25 07:07 codylittle