Skip to content

[next-auth][v5/beta][react] Fix #10244: Client sends multiple GET /session requests #13084

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jlalmes
Copy link

@jlalmes jlalmes commented Jul 3, 2025

☕️ Reasoning

Fix for bug introduced by #11470

Context here: #10244 (comment)

  • Added new internal _getSession function that broadcasts on the same BroadcastChannel the message listener is on, therefore not re-triggering a fresh fetch to GET /session.
  • Updated references to use this new function.
  • Kept external-facing getSession behaviour so that the user can force update the session.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Fixes: #10244

📌 Resources

@jlalmes jlalmes requested a review from ThangHuuVu as a code owner July 3, 2025 01:15
Copy link

vercel bot commented Jul 3, 2025

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 Jul 3, 2025 1:20am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Jul 3, 2025 1:20am

Copy link

vercel bot commented Jul 3, 2025

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

A member of the Team first needs to authorize it.

@jlalmes
Copy link
Author

jlalmes commented Jul 3, 2025

@balazsorban44 Can you please review & release! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SessionProvider sends many requests to retrieve the session
1 participant