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

fix: Include cookie headers on session fetch #971

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

silverbackdan
Copy link

🔗 Linked issue

N/a

I can complete more if required, but I believe this to be a fix. When refreshing a local session from the client-side, the cookie headers are passed to the getSession endpoint. However on server-side requests these are missed off. This change introduces continuity.

The issue I faced was that I also have a session initialised with an identifier in a cookie. This identifier allows me to get the user session, and get a secure stored refresh token which is only available server-side to then refresh the user JWT token automatically. I can post this refresh token to my API to generate a new JWT token. But I need to be able to retrieve the session.

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

Copy link

pkg-pr-new bot commented Dec 23, 2024

Open in Stackblitz

npm i https://pkg.pr.new/@sidebase/nuxt-auth@971

commit: c9d9090

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

Successfully merging this pull request may close these issues.

2 participants