nextauthjs / nextauthjs/next-auth
Add ability to update the session/jwt from the server
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
Description 📓
The new update function from useSession is good, but it has to be triggered from the client.
It would be great if we could trigger the updates from the server.
I like how blitzjs handles this with a $setPublicData function. (It's also nice to have the $setPrivateData function as well, but I can live without that).
I think in most cases this would be a more elegant way to update the session, rather than having to authorize and validate the client sessions from the current update implementation.
How to reproduce ☕️
N/a
Contributing 🙌🏽
Yes, I am willing to help implement this feature in a PR
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the useSession update function and the server-side session and JWT handling paths. Compare the requested server-triggered update with Blitz.js session management, then define how public session data should be updated and how completion will be verified without relying on a client trigger.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, typescript
- Domain
- authentication, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100